glsl: handle case where index is array deref in optimize_split_arrays