Revert 285e8213fed8b0d6a8afc73b686b99a4fcfe5b4a, since it is already
covered by recent commit 08ac8fb4687fb14cf9524a022527a64e033be9ab in a
more robust way to handle upgrade.