locking.SharedLock: Fix bug in delete function