Overzealous adding of NodeData into treeView from palette

I think I’ve been able to fix duplication by commenting out the lines that splice e.newParam into nodeDataArray

   379 myTreeView.model.nodeDataArray.splice(e.newParam, 1);
   407 myDiagram.model.nodeDataArray.splice(e.newParam, 1);

but I’m not sure why this works. My understanding was that changes made to the nodeDataArray after the diagram has been rendered will not do anything unless the model is re-rendered from the nodeDataArray…