Fixed bug where sorting caused listboxes/comboboxes to select the wrong items.