You have to make changes until there are not people whose only relationship to the rest of the tree is through the great grandmother. You typically do this by removing any children of the great grandmother, probably by changing their parent to the correct person, but perhaps by removing them from the tree. This can become a recursive operation.