Recorded on ArtRage iPad. Right around 92-94% undo either stops working or stopped recording. Then soon after the undo problem, the sketch layer duplicates into the inking layer.

It happens while drawing the girl's arm with pen. It's a little hard to see since the iPad isn't recording layer opacity changes just yet.

I recorded it with ArtRage iPad 1.2 and played it back on ArtRage 3.5.1. Accelerated playback takes about 3 minutes.

Is there a way to fix this script?

BTW, I commented out CanvasXform and SetClearCanvas, but the script was funny before the edit.