Fix an upgrade regression introduced in commit 32a42f2, and proposed change for upgrading

See commit message for explanations