Instances generating invalid Java code
The following ksy file generates invalid Java code.
[test.txt](https://github.com/kaitai-io/kaitai_struct/files/3132282/test.txt)

This code is outside the for loop that gets generated so it doesn't compile as the i variable hasn't been defined yet.

 this._io.seek(fileOffsets().get((int) i));

Compiler version is 0.8