Add case for ancestor if both args are same node