the first time a regex with /o runs it will do one thing and every other time it will do something different
Actually every other time it will do the same thing despite many people expecting it to do something different :-)
All flippancy aside though, your point re persistent environments is a good one that I hadn't considered. Mind you, persistent environments wreak all sorts of havoc with file scoped lexicals too but that doesn't mean they're inherently a bad idea - it just means you need to use them with caution.