Patch submitted as https://lists.samba.org/archive/samba-technical/2018-September/130004.html
Created attachment 14467 [details] Patch for v4-9-test
Created attachment 14468 [details] Patch for v4-8-test
Created attachment 14469 [details] Patch for v4-7-test
Reassigning to Karolin for inclusion in 4.7, 4.8 and 4.9.
Pushed to autobuild-v4-{9,8,7}-test.
Pushed to all branches. Closing out bug report. Thanks!