t, f = hyper_as_trig(e) should preserve f(t) = e invariant

This was not the case for constant expressions, see #7763.  Closes #7763.

@smichr