This reverts commit 3607a73700. i.e. it reapplies commits 86fc053269 and cebf6aa8fd.
3607a73700
86fc053269
cebf6aa8fd