See test case.
Created attachment 16894 [details] Test case
Created attachment 16895 [details] Move updating of transform to after the old repaint but before the new repaint (instead of after both repaints).
Comment on attachment 16895 [details] Move updating of transform to after the old repaint but before the new repaint (instead of after both repaints). r=me if you land a repaint test
Fixed in r27138.