Fix logic in related parents dump