Created a pull request for CTK: https://github.com/commontk/CTK/pull/722
I'll create a patch for now.
Pushed new branch T23004-PatchCTKPython.
I keep this task open until we can replace the patch with a new tarball of CTK.
Done in T23034: Make MITK compatible to MSVC 2017 and Qt 5.8/5.9.