We can simply use the `__tls_base` global for this which is guaranteed to be non-zero and unique per thread. Fixes: #117433