Fixed remaining integration loop problem

The test itself had a problem: the inner loop incremented i, which is
the counter for the outer loop.