Issue #876: fix a minor bug in graph compaction algorithm in pedigree (fixing single nodes sticking out)