Fixed packed-refs handling