This was using the implicit thread TLS object. All users of this have access to the thread object directly. Use that instead. Fixes a subtle bug were the frontend could be trying to do a callback and TLS sections weren't correctly set.