Copied _get_neighbors over and fixed cache issues

Adapted the old functions to the new implementation. Fixed an issue with
the cache of the predicted being incremented (+=).