Fixed numerous bugs in KnobUndoCommand.