Sanity check value range on item click.

According to Crashlytics reports, it can happen that there are
mismatches (seen e.g. count = 100, position = 100).