Strict mode compatibility

The outer-most loop invariant is `i` by convention, why the change to `j`?