Trampoline

This change also includes necessary bug fixes to the new AST factory wrapper, and also to the pretty printer.  If this change is controversial, I can pull those changes out into a separate one.
Likewise inLoop = false.