Fix casts for array setters broken when fixing nested C classes (c++out mode for Octave)

Introduced in 703d5b96fecbcaa3c1fd21cc55cf3e1e3d689dfd
Fixes compilation errors with Visual Studio