620898c73e
It looks like thread locals are not needed here as their global state is not utilized but creates troubles with memory management.