Found by Bailey Berro <email@example.com> who posted a patch to samba-technical.
Patch to follow.
Created attachment 14315 [details]
git-am fix for 4.7.next, 4.8.next.
Clean cherry-pick from master.
@Karo: please queue the attached patch
Pushed to autobuild-v4-[8,7]-test.
(In reply to Karolin Seeger from comment #3)
Pushed to both branches.
Closing out bug report.