test flatten-ast