Mex (and radars) shouldn't be upgradable until after an HQ of that level is obtained.
To clarify, I don't actually agree that this change is a good idea, but it's fun to think about. It would certainly make eco whoring harder if construction of a T2 mex required a T2 land (or air or navy) HQ and T3 mex required a T3 land (or air or navy) HQ.
If you really think about it, it's kind of silly that only mex (and radars) can be produced at one tech level before the fixed cost of that tech level is paid somewhere. T3 Air was actually balanced this way. Functionally, any T3 air production requires that a T3 pgen be constructed first. Therefore, on top of the T3 Air HQ, one also must invest in an expensive T3 pgen before T3 air can be used.
In addition to the tech balance, the same power balance can be applied. Currently, a T2 mex required about 60 energy income to upgrade, and a T3 mex takes I think like 400 (unassisted) If the tech nerf isn't enough, mex upgrade power consumption/cost can be nerfed to something requiring a higher tech pgen before upgrades are really feasible. A t1 mex upgrading to T2 could take 300 (500 - 300 = 200 left for other things), and a T2 mex upgrading to T3 could take 2000.
But these are just fun ideas. I know the balance team will never approve.
(*And of course the engineering suite upgrade on the ACU or an SCU on field would also count as the 'HQ' that allows T2/T3 mex and radars to be constructed.)