A build include extra units or disbanded units. For extra units, there is no previous move to restore. For disbanded units, it's not considered for restoring previous support hold moves.
Only the existing units from previous phase would be under consideration:
_ Did I have a support hold issued from previous phase?
_ Is there still a unit in the destination of my support hold. (This is easy).
_ Is the unit in the destination the same unit as before. (This is not that hard, just check that location to see if there was any dislodge).
If I write the game engine for this game, I would make it in Object oriented. Every location is an object. Every unit is an object. Once the engine is done, you can create so quickly and easily many, many different map variant by simply state it's objects characteristics: location, neighbors, color, land/sea, SC or not SC, SC home or not; unit objects to have naval/army, move, nation ownership and so on.
I am a Software Developer of some sort, so I do know enough to make some simple suggestion, not like I want people to go to the moon.