Use improved selection iteration in onSelectionChange

Also, remove redundant check in getValue since we prevent the first
value from being selected.