std: Re-optimize tls access on local allocation path

I did this once but acciddentally undid it in a later patch.