initialize iter properly in ast_iterator_begin; move those decls up more