Fixing redo/undo-based change detection