make pack-objects a bit more resilient to repo corruption