Fixed wrong code generation for constant-size arrays of non-primitive types.

References #380.