I don't really like the idea, but it is pretty simple to explain away. He's a machine a part wears out you replace it. Eventually you have replaced every part, perhaps multiple times, but the core programming remains intact. You can move the software to another frame.
Kinda like the story from the dwarf about the axe that has been in his family for many generations. Occasionally, it has had a new haft or blade, but it's still the same axe.