Correct logic for dealing with proxy nodes when doing path searches