Fix OutOfBound exception in swapoutOrphanBlocks

A bug(the buffer offset should be started from 0) in swapoutOrpahnBlocks function, which causes IndexOutofBound Exception. The PR fixes it.