This reverts commit 12d4769cb8, reapplying 524a028f69 but with fixes for failures seen in broader testing.
12d4769cb8
524a028f69