I'm not sure, I didn't mess with them, but in theory I would say yes, you could make them free doing that.
I think that _may_ be part of the math to calculate the final cost... i.e. Slingers cost 100g to buy or 10 hammers to build, Archers cost 200g to buy or 20 hammers to build, then the upgrade cost would base 100g difference but make it 75% difference of that as the final upgrade cost - 75 gold to updgrade.
Of course, I could be way way wrong on that. Probably am, but that's my take on it.