This fixes problems with indeterminate class object lifespan (Lua-GC) and forgetting to disable it or keep it until ready.
It works, but has random failures, probably due to threading issues.