Fix: properly calculate the array indices for 5 dimensions for the restart files.
Due to this problem the 1+1=2 sometimes did not work when using 5 dimensions.