title: SVG mask not working with multiple transforms
body: <p>I have several avatar frames(on chairs around a round table) that I'm generating dynamically in react. I'm trying to add a <code>clip-path</code> to the frames which will clip the image according to the frame's shape.</p>
  <p>I have the (generated) code below for one of the frames, which doesn't seem to work even though the clipping region falls exactly on the image(checked using chrome's inspector). I have tried clipping/masking it with a clip-path as well as mask(included in the code below). It'd be great if somebody could explain why this isn't working?</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;svg viewBox="0 0 2000 2000"&gt;
    &lt;g class="avatar_container"&gt;
      &lt;defs&gt;
        &lt;symbol id="avatarFrame" viewBox="-12 -8 135 135"&gt;
          &lt;path d="M55.5 121.217l8.313-11.856A50.55 50.55 0 00106.049 59.5 50.55 50.55 0 0055.5 8.951 50.55 50.55 0 004.951 59.5a50.55 50.55 0 0042.237 49.861z"&gt;&lt;/path&gt;
        &lt;/symbol&gt;
        &lt;use id="frame-def" xlink:href="#avatarFrame" x="0" y="0" width="100" height="100"&gt;&lt;/use&gt;
        &lt;mask id="frame-mask" x="0" y="0" width="2200" height="2200"&gt;
          &lt;rect x="0" y="0" width="2200" height="2200" fill="#000"&gt;&lt;/rect&gt;
          &lt;use x="1067.525" y="100" transform="rotate(315,1117.525,400)" xlink:href="#frame-def" fill="#fff"&gt;&lt;/use&gt;
        &lt;/mask&gt;
        &lt;clipPath id="frame-clip"&gt;
          &lt;use x="1067.525" y="100" transform="rotate(315,1117.525,400)" xlink:href="#frame-def"&gt;&lt;/use&gt;
        &lt;/clipPath&gt;
      &lt;/defs&gt;
      &lt;g class="avatar" transform="rotate(315,1117.525,400)" mask="url(#frame-mask)"&gt;
        &lt;image xlink:href="https://via.placeholder.com/100" x="1067.525" y="100" transform="rotate(-315,1117.525,150)" width="100" height="100"&gt;&lt;/image&gt;
      &lt;/g&gt;
      &lt;use id="frame" class="avatar_frame" xlink:href="#frame-def" transform="rotate(315,1117.525,400)" x="1067.525" y="100" width="100" height="100" fill="none" stroke="#545454" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"&gt;&lt;/use&gt;
    &lt;/g&gt;</code></pre>
  </div>
  </div>
  </p>