Check adding vertex multiple times