lock_any_ref_for_update(): reject wildcard return from check_ref_format