Fix bootstrapping errors.
Copy NTR-32 fix to SimpleRuleAstEmitter.