Just so I have it clear in the context of a discussion about the requirement to fit Mode S....
Bob owns a Cessna 172R fitted with a Brand X transponder system without Mode S. Bob can replace his transponder system with the same Brand X part no. system without Mode S and that is legal and safe.
Jeff also owns a Cessna 172R, but it is fitted with Brand P transponder system without Mode S. Jeff can replace his transponder system with the same Brand P part no. system without Mode S and that is legal and safe.
But if Jeff's transponder system goes kaput and Bob happens to be parting out his aircraft, it's not legal or safe to install Bob's Brand X system in Jeff's aircraft to replace the Brand P system?