Fix segfault in NeighborhoodCorrelation if too few slices.

If the number of slices was less than the neigborhood radius, one
of the loops went out of bounds.