New opt: T.dot(A,B)[i] -> T.dot(A[i],B)

This is partial implementation of gh-2151