turns out this was fixed already upstream. just backport the relevant part of the patch.
Attach a file by drag & drop or click to upload