prevent creation of ways with duplicate segments or repeated nodes