ismindex: handle discontinuous streams better