This should indeed break the whole loop since a resource item is ought to have an ID