Don't register lock cleanup if WriteLock() failed