Tiles py fix (rebased onto develop)



This is the same as gh-2509 but rebased onto develop.

----

While testing `omero.utils.tiles.LoopIterator` via https://gist.github.com/joshmoore/816cdf461669a7e06d46 I ran into a couple of compile errors in tiles.py. No idea when/how they were introduced. Was afraid to check blame. :smile:

/cc @will-moore