Thanks to Michael D. Hoyle for the report and Tim Graham for the review. Backport of 623ccdd5 from master