Fix crash when running SumNeighbours algorithm.

Refs #10037.
Fix the build.

Refs #10037.
Merge remote-tracking branch 'origin/feature/10037_crash_on_sum_neighbours'