Fix compile on Java 8.

The original code was causing javac to throw an AssertionError. Working
around the labelled break (by using a flag) seems to fix this fine.
Trying to minimize differences against the original code.
merge dev_5_0 -D org: PR 1259 (Fix wrong number of channels for images in fake SPW (fix #12501) (rebased onto dev_5_0))
merge dev_5_0 -D org: PR 1262 (jj2000: Fix compile on Java 8 (dev_5_0))
merge dev_5_0 -D org

Repository: openmicroscopy/bioformats
Already up-to-date.

Merged PRs:
  # PR 1259 bpindelski 'Fix wrong number of channels for images in fake SPW (fix #12501) (rebased onto dev_5_0)'
  # PR 1262 rleigh-dundee 'jj2000: Fix compile on Java 8 (dev_5_0)'

Generated by OME-5.0-merge-push#168 (http://ci.openmicroscopy.org/job/OME-5.0-merge-push/168/)