Electromagnetic mass differences and inelastic electron scattering