If you delete item 0, item 1 moves up to become item 0, item 2 moves up to become item 1, and so on. You either need to delete the items in reverse, or just delete item 0 every time, or (the simplest) use -1 to delete them all at once.
You can either change RemoveItem(i) to RemoveItem(0) which will iteratively remove the first item of whatever remains in the list, or dispense with the loop altogether and RemoveItem(-1) to get rid of all items at once. Per the help...
You can also specify -1 to completely clear the contents of the control, removing all items at once.