read_packed_refs: use skip_prefix instead of static array