Good catch: it is indeed wrong. However, my deadlock remains...
Why don't you try tryLock()?
It is easy, and it will tell you on the spot if its a mutex deadlock that you have...