Ionisation Always Reports Manganese as Current Element

I’m running a simulation where photons are shot at a water sphere. In the stepping action I try to check what element the current particle is interacting with. This is handeled separately for ionisation and electromagnetic processes. The code for both blocks is pretty much the same:

const G4VProcess* process = postStep->GetProcessDefinedStep();
if(const G4VEnergyLossProcess* ionisationProcess = dynamic_cast<const G4VEnergyLossProcess*>(process)){
        const G4Element* el = ionisationProcess->GetCurrentElement();
            element = el->GetZ();
            G4cout << "Ionisation Element: "<< element << G4endl;

Yet it seems to work for electromagnetic processes, but for ionisation it always yields “25”. There is no manganese anywhere.

The electrons also sometimes deposit suspiciously large amounts of energy through this process without creating secondaries:

Photoel Element: 8
Ionisation Element: 25

End of Event Action: 
No of Tracks: 2
Track 1: 
        Type: Photon | Parent: 0 | Creation: None
                { Process: Photoelectric | deposited E: 0 keV | at Pos: (0.0600726,0.441483,1.08421)mm | in Volume: WaterSphere | w/ Element: 8 }
Track 2: 
        Type: Electron | Parent: 1 | Creation: Photoelectric
                { Process: Ionization | deposited E: 52 keV | at Pos: (0.046877,0.451314,1.10164)mm | in Volume: WaterSphere | w/ Element: 25 }

Any idea what could be at fault here? Is the cast “working” but messing up data fields?

physics model: polarized livermore
physics used: compton, rayleigh, photoelectric, ionisation, multiple scattering, bremsstrahlung, fluorescence, meitner-auger
but the problem persists if I reduce it to only compton + ionization