Find the parent node in the flattened list.
Flattened node list
Current node index
Parent node index or -1 if at root
Find the parent node in the flattened list.