Thanks for your bug report. This has been discussed before. A $regml() that is unnamed is context-dependent. It is repeatedly cleared and reused in many different contexts. You need to use it in the context in which it was created.