DEV: Fix incorrect optimization in SvgSprite take 2. (PR #13244)

Follow-up to 0700e9382d551e4948b493e1219f3119e52bcae4

GitHub