This patch should fix the cause of the stage2 failures and PR45185. This reverts the revert commit c52f839e72.
c52f839e72