Fix treatment of array input/output variables in reflection