Remove unessesary thread local
Merge pull request #5841 from stuartwdouglas/threadlocal

Remove unessesary thread local