threads: mixing Conditionals with CriticalSection exit code was broken

If one thread was waiting on a conditional, and another forced an exit
of the controlling mutex, when the conditional woke up, it would have
an invalid lock count associated.