Bug fix from==to case of getmatrix constant folding

Not found in the wild, but when I was viewing this section of code, I realized that the optimization here would transform the code incorrectly. I removed the incorrect code and just folded that case to be recognized in a later clause in the function, which did handle the transformation correctly.