Fixes #5495: upgrade on 2.11 does not end correctly
Merge pull request #477 from jooooooon/bug_5495/upgrade_on_2_11_does_not_end_correctly

Fixes #5495: upgrade on 2.11 does not end correctly