Pulls @XhmikosR's commit from #25972 into separate PR to keep the v4.1.0 ship PR focused on just the shipping effort.