I can't help but think debugging memory allocations shouldn't be this hard

The type information of CSys being unavailable would cause a slower way of calling updatecsmat! which requires all the integers to be boxed. The array is already a boxed value.