Make package restore robust to database downtime