Fix bug caused by treating term as an expression
Merge pull request #59043 from petercollingridge/multi-rat-exp-4

Fix bug caused by treating term as an expression