That does suck. I know lots of mods seem to maintain road legality (headers that still accept sensors, etc), but if the benefits of these things are overrided by the stock ecu later on anyhow....
So I guess the priciest option is: do your mods within reason, get an aftermarket ecu, get the car tuned correctly with that, and then switch ecu's and limp to the inspection station annually.