Get the node IDs of the parents of the branch, including the node itself.