Maybe what is going on is wglCreateContextAttribsARB creates a child window on the rendering thread, then DestroyWindow on the main thread is unable to delete the child that was created on the rendering thread, but I need to investigate further. In the meantime I will just add a check that hides the window if DestroyWindow fails.
That doesn't actually make sense, because this only occurs if windows are created in rapid succession. Otherwise it is fine...