Fixed an issue with variable inlining. Unfortunately, when inlining we must clone the original expression to avoid bad interaction with other rules (LoadFieldAccessRule, etc.).

git-svn-id: https://asterixdb.googlecode.com/svn/branches/asterix_inline_vars@793 eaa15691-b419-025a-1212-ee371bd00084
diff --git a/asterix-app/src/test/resources/optimizerts/results/consolidate-selects-complex.plan b/asterix-app/src/test/resources/optimizerts/results/consolidate-selects-complex.plan
index f3e404f..553a531 100644
--- a/asterix-app/src/test/resources/optimizerts/results/consolidate-selects-complex.plan
+++ b/asterix-app/src/test/resources/optimizerts/results/consolidate-selects-complex.plan
@@ -4,9 +4,7 @@
       -- ASSIGN  |PARTITIONED|
         -- STREAM_SELECT  |PARTITIONED|
           -- ASSIGN  |PARTITIONED|
-            -- ASSIGN  |PARTITIONED|
-              -- ASSIGN  |PARTITIONED|
+            -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
+              -- DATASOURCE_SCAN  |PARTITIONED|
                 -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                  -- DATASOURCE_SCAN  |PARTITIONED|
-                    -- ONE_TO_ONE_EXCHANGE  |PARTITIONED|
-                      -- EMPTY_TUPLE_SOURCE  |PARTITIONED|
+                  -- EMPTY_TUPLE_SOURCE  |PARTITIONED|