Bug fix from==to case of getmatrix constant folding