The state should impose "builder's remedy" zoning on local governments that do this, if too high a percentage of existing properties don't confirm to current zoning. Both citywide and on a more local scale. (I'm not sure what the right local scale is, though, but maybe specific to a zone.)
This is why 99% of existing homes in Boston are illegal according to the city's own zoning code. Making it impossible to build anything - even the type of homes that already exist - strengthens the city's leverage in these negotiations.