Passing top-level statements of the AST turned out to be a mistake. Live and learn.