There is a wrong substitute of ParticleDefinition in G4MuonMinusCaptureAtRest::AtRestDoIt. G4MuonMinusCaptureAtRest.cc line 309th G4ParticleDefinition* pd = Gkin[isec].GetParticleDef(); should be G4ParticleDefinition* pd = Cascade[isec].GetParticleDef(); and there are many meaningless static declaration in this files.
was fixed in 5.1.