Start with stone wall foundations instead of built walls. It is achieved by using a placeholder unit whose ATTR_DEAD_ID is set to stone walls. A quirk of buildings dying into buildings is that you get a foundation (unless the train time attribute is set to 0 in which case it is fully built). This would probably work in UP since I don't use any advanced tricks but it really depends if the building foundation thing is true there as well or not- just remember to define the constants (DE predefines a lot).