fix access to array fields by index (regression of #242)