Fixed recursion bug in ancestry.