Fixing recursively locking a non-recursive lock