Crash on importing svg to layout generator

WM crashes when you try to import an SVG file. To repro, create a Layout Generator. Do Add Layout from file… Click Set File… in the Layout Shape Import dialog, and choose an svg file. clicking open will crash WM.

I have found that it will not crash if the SVG contains only 1 path. Any more than 1 path in the SVG will cause WM to hang indefinitely.

I have tested that this crashes on both stable and dev builds 3021, but does not crash in version 2.3.7.

Thanks!