Unroll the for loop using nextTick.