Use copy array for comparison.
Removing cornerpts deletion corrects conversion to graph.