Stupid multithreading error in a test