Merge pull request #13 from cheshire/tsan_fix_cherry_pick

Fix for TSan unit-tests: