CustomMesh bug

Hello,

This is a simplified code which works fine under Rhino7
But throws exception under Rhino8 as SetMesh()
(I tested it only under Windows with Rhino 8.8)

   public class MyMesh: Rhino.DocObjects.Custom.CustomMeshObject
   {
       public MyMesh()
       {
           var bb1 = new Rhino.Geometry.BoundingBox();
           bb1.Min = new Point3d(0.0, 0.0, 0.0);
           bb1.Max = new Point3d(1.0, 1.0, 1.0);
           var baseMesh1 = Rhino.Geometry.Mesh.CreateFromBox(bb1, 1, 1, 1);
           SetMesh(baseMesh1);
       }
   };

Could you please check what is wrong with it?
Or could you fix it in Rhino 8?

Thanks,
Márton