R: fix graph.neighborhood for many graphs (#508).