An error will occur when the Index equals the number of items in the collection
private static ClientOperation<T> Remove(ControlItemCollection items, int index)
{
if (index < 0 || index > items.Count) // should be >= instead
return null;
var item = items[index];
items.RemoveAt(index);
var operation = new ClientOperation<T> {Item = (T) item, Type = ClientOperationType.Remove};
return operation;
}