Perform some more inlining and CSE on the grammar. No functional changes.