Fix excessively unlocking recursive unlock