ancestors and descendants were missing some nodes; use breadth-first search instead of depth-first to fix this.