7594: power rules correction so (x**y)**z != x**(y*z)

fixes #7594
The piecewise object could be used (especially as it returns one already).