It makes more sense to return a reversed path, so pop_back can be used to follow it.