Get ancestor node for the given node
Assume getParent only returns one parent node per GatingHierarchy