Address a race condition in the tests; enable the race detector.