Clean out a threads local data before doing work
Merge pull request #594 from hassox/thread-cleanliness

Clean out a threads local data before doing work