Fixed bug in stackMoveOneStep loop

It was iterating over currentItems, but using the index for lookup in
the finalItems-Array