In the case that the functions squared and/or cubed are in the prior (and the structure allows for it) it is possible to sample e.g. $x^{3^2}=x^9$. During simplification in sample.__sample_tree_raw this will be simplified to $x^9$. If there is no "**" operator in the operator prior, tree_node._from_prefix_recursion will not recognize this concatenation of operators as legal (allthough probably unwanted) construct and raise:
Exception: ** has no defined type in any space