Prevents unlocking an already unlocked or non-existent mutex.
Patch from upstream.
Issue reported by jj@