Fix a bug with the GetNeighborhood function

This occurs when the distance parameter is 0.