Fix for-loop bug in image viewer. See #12303

Simple bug fix in for-loop. Fixes https://trac.openmicroscopy.org.uk/ome/ticket/12303

To test:
 - Open web full image viewer.
 - Click 'Edit' and make rendering changes.
 - Click 'Apply' - changes appear in viewer
 - Click 'Save' - check that webclient thumbnail is updates, changes are saved etc. (E.g. refresh viewer and check settings are saved).