A test case on a ListView shows that after clearing and updating items:
When the previous selected index is 0 it becomes 1 and the selectedObject is null.
When the previous selected index is 1 it becomes -1 and the selectedObject is null.
So the index is not correct when its value come from 0.
When the previous selected index is 0 it becomes 1 and the selectedObject is null.
When the previous selected index is 1 it becomes -1 and the selectedObject is null.
So the index is not correct when its value come from 0.