Interesting bug! Reading through this made me add a couple of new questions to http://www.debug.coach/
Could there be a bug in a library/3rd party code? Could there be a possible race condition?
I remember recently hitting a bug in a 3rd party library in a Jar provided by Oracle in WebLogic to do with an incorrect implementation of the W3C DOM API causing XML validation to fail whenever attributes were present. Of course the J-Unit tests provide a different Jar and thus a different (correct) implementation and no bug. Took ages to track down.