should_pack_ref(): new function, extracted from `files_pack_refs()`