don't double count self links in graph