Use legacy corrupted state exceptions.
Fix a bunch of duplicate variable bugs.