cf249ab870
The surrounding code has diverged on master, so the cherry-picked commit doesn't work without adjustments, whoops.