Fix candidate index calculation in the last page.

This fixes the bug that in a vertical candidate panel, candidate
indexes in the last page can be miscalculated due to a faulty
algorithm.
Bump to 1.0.9