Fix spatialstateupdate template in Cython (range(N-2, 0, -1) --> range(N-2, -1, 1) to include the 0).