Update the pointer to the next block when reversing

Just reversing the array is not enough, the pointers to the
beginning of the next block must be changed to the reversed
array index.