Exponentiation expression should be right associative

Fixes #1245