Couldn't test it yet, but doesn't the first call to ``remove_index_from_queue`` change the following indexes? This would mean that already the second call would skip one index to be deleted.