In G4Step.icc, in the last line of the method InitializeStep(G4Track* aValue), the post-step point is initialized to the pre-step point. In this line, the variable fCharge in G4StepPoint is used uninitialized. The problem can be fixed by inserting the line fpPreStepPoint->SetCharge(fpTrack->GetDynamicParticle()->GetCharge()); in the G4Step::InitializeStep method. It looks as if this line was somehow omitted in all versions of Geant4, including 5.0.
Fixed in tag track-V05-00-02