Thanks moritz.pfeiffer at alp-phone.ch for the report and Tim Graham for the initial patch. Backport of c7c64741 from master.