Thanks Julien Hartmann for the report. Backport of 20d1cb33c2ec1242e16c49deb88e8c70517b2d1a from master