chasing down apparent multi-thread race condition