Added sameParent method to Node.