GEOMESA-328 Fix IndexIterator exception

     * The fix is from @anthony-ccri.
     * The tests show the exceptions which we observed on tablet servers.
Switched to a for loop, but it is tweaked from above.