refs: pass NULL to resolve_ref_unsafe() if hash is not needed