Documenting the race condition and adding missing test cleanup