Sanity check index numbers when reading channels

This check is good in general, but it is being added specifically
to detect cases where the response read from the scanner is out of
sync with the query. This can happen if, for example, another
program is also querying the scanner while a read is in progress.