Fixes #5495: upgrade on 2.11 does not end correctly

Er actually, @VinceMacBuche just hit me with an intelligent remark: this is a bug, so should be fixed on older versions.