This is a regression introduced in 3.5 by revision eba80326ba53. Fix by Jelte Fennema, test case by me.
Attach a file by drag & drop or click to upload