Generally speaking, X doesn’t really “replace” files like that. In your project, the program just REFERENCES one form of clip or another.
You should have a pool of Original clips somewhere (whatever was originally imported), potentially another pool of Optimized media (if the shooting format required that and transcoding was invoked on import), and, potentially, a third pool of Proxy media if THAT was selected at some point.
When you switch X from one mode to another, it just switches the pointers between the content pools.
It never really “replaces” anything in that sense. Just re-links.
If you’re showing clips being offline, then the pointers lead to dead addresses – which is another issue, but not one of technical “replacement.”
The test is to simply change your viewer between Optimized/Original and Proxy in the little disclosure triangle at the far right top of the viewer window. What stays RED shows you what requires either locating or re-rendering.
Hope that helps.
Know someone who teaches video editing in elementary school, high school or college? Tell them to check out http://www.StartEditingNow.com – video editing curriculum complete with licensed practice content.