WebListBox loses SelectedRowIndex after push on sorter arrows

The Weblistbox shows sorter arrows that take care of sorting. It works. With a button I read the selected row with SelectedRowIndex and use that data for further processing. When I select a row, and click on the sorter arrow, the row changes position in the Listbox, the row shows selected, but the SelectedRowIndex is -1. Is this a bug or am I missing something?