Add a test that shows the problem.
Might be column references in sibling nodes of the select; pass where we got it from.
Now have expected result.
merge mmcm: Fix subquery flattener when columns from flattened tables appear in places like the ORDER BY.

https://code.launchpad.net/~mmcm/akiban-server/sql-flatten-rebind-order-by/+merge/171882