can you have multiple upgrades from tags?
i seem to recall having an <option> tag at some point
you could create a few clones of the various buildings
if the current setup is b01->b02->b03->b04 requiring you to build 01-04 in that order
you create a clone of 02, (c02) and update b03 so that it can upgrade from the b02 and c02 buildings
similar you create a clone of 03 and 04 and change b04 to upgrade from either its original or its clone
so you could have multiple build paths, b01-b02-b03-b04, c02-b03-b04, c03-b04, c04