fix children & parents to not have doubled entries if multiple children of one item are in the loop