All indicators suggest that the bug workaround'ed by the commit I'm reverting was a side-effect of #16743, which is now fixed. This reverts commit 5f6c4826.