I want to hear more about this self-rewriting VBA macro
I think they were using file system calls with some tools to rewrite the file directly. But IIRC it's possible to do it just via the API.
This is like running into issues with non-converging iterated calculations...