Problem were two global variables which kept track of inserted topo lines. These are now member variables.