This reverts commit 42514bfd. There is still an unsolved regression from this commit (#28002) which needs to be addressed before cherry-picking this one.