Fix the logic for chained installs from sources on upgrade.