The only example of that is 31215, and there the cab wasn't replaced, it just had the headcode panel removed as part of a repair after the roof had been hit by a crane.It was indeed common - some Class 31s ran around with headcode panel at one end only as a result.
D5518 had two cabs without headcodes replaced by two cabs with headcodes.
I agree with this. Damage at one end only often indicated a light engine collision.In those days it was not uncommon for a collision to result in damage to both cabs. Typically, front (obviously) of loco collides and stops suddenly, 60 wagons pile into back cab.