Instead of calling an operator I just call `collection.new()`. Moving the code into a separate function also simplifies it. In its new form there is also no undefined behaviour when me.vertex_colors is non-empty but without active layer.