Thanks Tomasz Kontusz for the report, Baptiste Mispelon for analysis and Tim Graham for the review. Backport of 3cf1c026 from master.