Set selectedIndex if option list is rebuilt.

I keep forgetting little things here.