The initial fix for #164273 had several follow up commits to fix the
initial implementation. This fix induces a lot of regressions and a
refactoring of the area is required in order to fix the issue in a later
release.
This reverts the following commits (from oldest to latest):
72af746a3e226acaf7ae
d592aa5a10f44164cd403257270802eb2a4b123a
34436db53d3e4ad36e86019109fb5ceee9bb4d8c
de4b1f5572f8ff5a38a17655584ae200774551c6