clear next array when user would make a change in the elements in the middle of an undo sequence.