Thanks niko at neagee.net for the report and Emil Stenstrom for the patch. Backport of e0363c688 from master.