clone the AST before inserting it.
replaceSymbolsInJavaScript: make it work nicely with objects.