Close #4956 – Fix update SVG elements

I added isSvg checking.
And test for this bug.