Thanks Domas Lapinskas for the report and Tim Graham for the review. Backport of 426b63ba04 from master.