lock_any_ref_for_update(): do not accept malformatted refs.