GeneratorObjectsTPCnv: Fix crashes in hepmc2 build.
Fix use of invalidated iterator in hepmc2 code.
GitLab Registry scheduled maintenance on Wednesday, October 09th 2024 as of 20:00h Geneva time for a period of 1 hour. Further information under https://cern.ch/otg0152540.
Fix use of invalidated iterator in hepmc2 code.