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