Horrendous bug in callOnMainThreadAndWait
When the main thread is done with the invocation and decides to signal the waiting thread, it doesn't reacquire the mutex first. Ouch!
In radar as <rdar://problem/9472883>