Fix saving a function to an xml file in parallel
Merge branch 'mliertzer/fix-issue-361'