regtest ThreadSafetyBuiltinObject cleanups