This was reverted because of a performance regression, which is fixed by D116612 that I will commit directly after this change. This reverts commit e92d63b4.