Fix issue introduced by 20950e0.

Selected items and other invisible items were not ignored by highlightUnderEvent when calculating index.
This caused highlighting of incorrect items when the list contained hidden items.