That is because in following line
foreach (string o in listBox1.SelectedItems) selectedItemIndexes.Add(listBox1.Items.IndexOf(o));
You will get empty string, and it will always return the first index of the empty string.
The solution is to use the selectedIndices as following:
foreach (int selectedItemInd in listBox1.SelectedIndices)
{
selectedItemIndexes.Add(selectedItemInd);
}