lock_ref_sha1_basic: do not die on locking errors