Once the loop has determined a vertex is used at least twice, there is no need to count how many more times it is used. Return immediately after detecting the second use.