ISQReader: tidy up an inner loop