Fix assertion

In general, handle array types like compound types.
Since we skip the if-condition for compound types,
we also need to do it for array types in this case.