optimize indexing of the form A[i,j] for matrix expressions A.