ast: transform now allows rewrite of nested code