The DeleteNodes method expects a list of nodes to delete.
If one passes an empty list (length = 0) the method throws an exception
as it doesn't check if the list contains items. It would be nice if it would first
check this and just leave the method if the array passed is empty.