SVG OMG latest

I lied when I said the last PR was the last PR... for 15.2 and cherry-pick master.

Fixes resetting historyIndex if a color mode change is not required.