Detect and correct a suspected path_set bug

paths really need to be ordered lexicographically by component, or
the logic of looking for nearby paths will fail.