my search may be wrong, but i only see this method called in a test. thread locals should be removed be it tests or not (unless I'm overlooking something in your PR)