I have a simple solution, dont allow the house to be blasted by direct HE fire. Kill the tank or suppress the inf. gun.
just my 2 cents
p.s. It seems to me that putting more than one or two squads of inf. in the same building is counter to proper tactical spacing SOP. Kind of like clumping infantry in the open or trees, artillery will massacre them, but casualties can be minimized if they were are spread out a bit.