Switched from TVars to TMVars. Now works reliably, if single-threaded.
Now consistently works multithreaded, be it way too slow.