Discovered by Steve French of Microsoft. Torture test and fix to follow.
Created attachment 14209 [details] git-am fix for 4.8.next. Cherry-picked from master.
Created attachment 14210 [details] git-am fix for 4.7.next Back-ported from master.
Reassigning to Karolin for inclusion in 4.7 and 4.8.
(In reply to Ralph Böhme from comment #3) Pushed to autobuild-v4-[7,8]-test.
(In reply to Karolin Seeger from comment #4) Pushed to both branches. Closing out bug report. Thanks!