ql-io/ql.io — pull request #491 by s3u (2012-06-08 17:26:59+00:00)
Title: Fix regressions 

1. The compiler gathered all orphans as individual nodes and attached them to the return statement. With this change, the compiler gathers orphan subtrees instead.
2. The compiler registered duplicate listeners in listeners array. This caused an execution plan bloat at runtime. Now the compiler checks for duplicates.
3. The compiler used to add dependencies to the return statement and return's rhs. This caused the engine to look in both places. Now, all dependencies are added to the rhs side of the return statement.
4. Fixed more tests to avoid deepEquals on compiler output.