Move Element::setNeighbor() into private section.