The fix is to drop nested items from the encoded AST. Nested items may themselves be inlined, but that is an independent question.