Remove more usages of variable array subscripts. Fixes issue #966