Fix sim g4 core generators

72x version of PR5635 with addition of avoiding a change to a const variable. LIkely some performance hit, but should restore intented behavior. While not conclusive, I do see that the MET values start to diverge with and without this PR on an event with high MET. Good.