Don't rewrite files when they haven't changed
Fix one last bug with regen headers

At least I hope it's the last bug.
Check in properly regen'd headers