Added debug block to verify uniqueness of edges.