AVI: fix array index calculation for tile reading (rebased onto dev_4_4)



This is the same as gh-667 but rebased onto dev_4_4.

----

Fixes ticket #11100.

To test, please verify that the .avi files from QA 7336 and QA 7560 both import into OMERO (after unzipping, if needed) and that all of the develop builds are green.

/cc @gusferguson