In fact, sometimes the lookup tables aren't needed at all.
Lifted the ipow and gas lookups into the mini-AST used for
index calculations, so that they can be constant-folded if
the lookup index is known at compile time. Then only emit the
tables if they are referenced by an expression.