Avoid searching if an iterator is already positioned correctly.

Some fiddling to avoid const warnings.
The problem is that `currConst` here is operating on the iterator's cursor, but once we call into `dataForInternal`, we don't have that cursor any more.