This reverts commit 4fdd51b732. See the ticket for concerns with this implementation; it will be revisited. Backport of aabceadd7d from master
4fdd51b732
aabceadd7d