Improve handling of config during package upgrades