reverse order of the iteration, such that mutate the xpath nodes during iteration will not crash