Fixed logic for pedigree tree generator    Ticket: GCP-9882     Reviewer: Darl