fix two construction bugs

1) Ensure that we begin the DAG where there is only a single (reference) node.
This involved a programming error of a missing '<'.  It was not quick to find.
OUCH.

2) Update gssw to prevent double-adding edges.
resolve flattening bug related to mishandling of graph-relative softclips
more flattening fixes

Previous commit is very unhappy.  This one is much happier!