fixed bug that was caused by broken AST inserts after addition of nested statements