SVG clip-rule is incorrectly used
When composing clip regions, the SVG output sets "clip-rule" to the surface group, but this is incorrect according to https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clip-rule which states that clip-rule should be applied to clip-path elements, not to the referencing element.
See attached that reproduces the issue, and two example outputs, the correct PNG:
and the wrong SVG:
I'm also attaching a corrected version of the SVG which should come out: