Merge branch 'swig-4.1.0-fixes' into 'master'

SWIG: compatibility with version 4.1.0

Closes #621

See merge request !2058
67 jobs for !2058 with swig-4.1.0-fixes into master in 204 minutes and 8 seconds (queued for 14 seconds)