Thanks Jens Lundstrom for the report and Tim Graham for the review. Backport of 632a9f21 from master.