I'm pretty sure I've experienced similar behaviour before, but at this point it's been a while, so not sure what was the sequence of events to cause. I've tried it with the RStudio I have (v1.2.1114) and it doesn't look anything happens if I do "Replace all".
Can you share a bit more about what you are doing exactly, so I can check it myself to see that maybe upgrading RStudio might help in your case.