Backporting from OpenUpgrade/OpenUpgrade