ENGINE-1709, fix leak, lock was not always deleted from map