I was young and stupid when I wrote it. It doesn't actually clone byref values. It mostly worked when used in apps, but this is actually the cause of some of the weird unit tests failures. I'm working on a fix in #4062