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.