[BISERVER-8697] Fixing initial selectedIndex logic