Fixes #5495: upgrade on 2.11 does not end correctly