Make flatten_join_alias_vars() do the right thing when expanding an alias referenced from a subquery.  Per example from Stefanos Harhalakis.
Make flatten_join_alias_vars() do the right thing when expanding an alias
referenced from a subquery.  Per example from Stefanos Harhalakis.

kaknikhil/gpdb,yuanzhao/gpdb,lintzc/gpdb,ovr/postgres-xl,yuanzhao/gpdb,greenplum-db/gpdb,yuanzhao/gpdb,zaksoup/gpdb,xinzweb/gpdb,Postgres-XL/Postgres-XL,pavanvd/postgres-xl,janebeckman/gpdb,Quikling/gpdb,yuanzhao/gpdb,kmjungersen/PostgresXL,kmjungersen/PostgresXL,xuegang/gpdb,jmcatamney/gpdb,Quikling/gpdb,atris/gpdb,Chibin/gpdb,foyzur/gpdb,jmcatamney/gpdb,postmind-net/postgres-xl,lpetrov-pivotal/gpdb,greenplum-db/gpdb,lisakowen/gpdb,Chibin/gpdb,lpetrov-pivotal/gpdb,randomtask1155/gpdb,Quikling/gpdb,arcivanov/postgres-xl,janebeckman/gpdb,tangp3/gpdb,xuegang/gpdb,rvs/gpdb,postmind-net/postgres-xl,arcivanov/postgres-xl,CraigHarris/gpdb,zeroae/postgres-xl,xinzweb/gpdb,yazun/postgres-xl,xinzweb/gpdb,yazun/postgres-xl,xuegang/gpdb,randomtask1155/gpdb,arcivanov/postgres-xl,ahachete/gpdb,tangp3/gpdb,50wu/gpdb,rubikloud/gpdb,edespino/gpdb,chrishajas/gpdb,50wu/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,lintzc/gpdb,adam8157/gpdb,lisakowen/gpdb,Quikling/gpdb,rvs/gpdb,lisakowen/gpdb,cjcjameson/gpdb,edespino/gpdb,xinzweb/gpdb,pavanvd/postgres-xl,Quikling/gpdb,yuanzhao/gpdb,adam8157/gpdb,ovr/postgres-xl,kaknikhil/gpdb,cjcjameson/gpdb,xinzweb/gpdb,rubikloud/gpdb,edespino/gpdb,chrishajas/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,greenplum-db/gpdb,foyzur/gpdb,rvs/gpdb,postmind-net/postgres-xl,rubikloud/gpdb,janebeckman/gpdb,rvs/gpdb,yuanzhao/gpdb,tangp3/gpdb,rubikloud/gpdb,ahachete/gpdb,Chibin/gpdb,CraigHarris/gpdb,ahachete/gpdb,lintzc/gpdb,zaksoup/gpdb,yuanzhao/gpdb,yazun/postgres-xl,royc1/gpdb,randomtask1155/gpdb,ahachete/gpdb,lpetrov-pivotal/gpdb,tangp3/gpdb,cjcjameson/gpdb,janebeckman/gpdb,snaga/postgres-xl,zeroae/postgres-xl,randomtask1155/gpdb,rvs/gpdb,foyzur/gpdb,yazun/postgres-xl,greenplum-db/gpdb,Quikling/gpdb,atris/gpdb,oberstet/postgres-xl,yazun/postgres-xl,ashwinstar/gpdb,janebeckman/gpdb,xuegang/gpdb,yuanzhao/gpdb,0x0FFF/gpdb,royc1/gpdb,rubikloud/gpdb,arcivanov/postgres-xl,royc1/gpdb,ahachete/gpdb,rvs/gpdb,janebeckman/gpdb,techdragon/Postgres-XL,kaknikhil/gpdb,edespino/gpdb,adam8157/gpdb,foyzur/gpdb,janebeckman/gpdb,techdragon/Postgres-XL,0x0FFF/gpdb,greenplum-db/gpdb,ahachete/gpdb,kmjungersen/PostgresXL,jmcatamney/gpdb,xuegang/gpdb,Postgres-XL/Postgres-XL,greenplum-db/gpdb,CraigHarris/gpdb,CraigHarris/gpdb,Chibin/gpdb,xuegang/gpdb,kaknikhil/gpdb,randomtask1155/gpdb,CraigHarris/gpdb,edespino/gpdb,tpostgres-projects/tPostgres,kaknikhil/gpdb,snaga/postgres-xl,0x0FFF/gpdb,atris/gpdb,Postgres-XL/Postgres-XL,rubikloud/gpdb,0x0FFF/gpdb,cjcjameson/gpdb,zeroae/postgres-xl,0x0FFF/gpdb,chrishajas/gpdb,royc1/gpdb,royc1/gpdb,zaksoup/gpdb,cjcjameson/gpdb,lpetrov-pivotal/gpdb,CraigHarris/gpdb,zaksoup/gpdb,50wu/gpdb,kaknikhil/gpdb,zeroae/postgres-xl,jmcatamney/gpdb,Postgres-XL/Postgres-XL,ashwinstar/gpdb,jmcatamney/gpdb,chrishajas/gpdb,lintzc/gpdb,tpostgres-projects/tPostgres,tpostgres-projects/tPostgres,lisakowen/gpdb,kaknikhil/gpdb,ovr/postgres-xl,50wu/gpdb,xuegang/gpdb,zeroae/postgres-xl,yuanzhao/gpdb,tpostgres-projects/tPostgres,lintzc/gpdb,foyzur/gpdb,ovr/postgres-xl,Quikling/gpdb,greenplum-db/gpdb,snaga/postgres-xl,0x0FFF/gpdb,50wu/gpdb,lpetrov-pivotal/gpdb,zaksoup/gpdb,zaksoup/gpdb,pavanvd/postgres-xl,yuanzhao/gpdb,tpostgres-projects/tPostgres,lisakowen/gpdb,50wu/gpdb,CraigHarris/gpdb,rubikloud/gpdb,tangp3/gpdb,cjcjameson/gpdb,edespino/gpdb,lpetrov-pivotal/gpdb,50wu/gpdb,janebeckman/gpdb,royc1/gpdb,arcivanov/postgres-xl,kaknikhil/gpdb,kmjungersen/PostgresXL,rubikloud/gpdb,rvs/gpdb,janebeckman/gpdb,xinzweb/gpdb,greenplum-db/gpdb,cjcjameson/gpdb,lisakowen/gpdb,xuegang/gpdb,lpetrov-pivotal/gpdb,Chibin/gpdb,jmcatamney/gpdb,adam8157/gpdb,oberstet/postgres-xl,Quikling/gpdb,chrishajas/gpdb,oberstet/postgres-xl,edespino/gpdb,snaga/postgres-xl,ashwinstar/gpdb,pavanvd/postgres-xl,randomtask1155/gpdb,ovr/postgres-xl,Chibin/gpdb,lisakowen/gpdb,randomtask1155/gpdb,zaksoup/gpdb,foyzur/gpdb,edespino/gpdb,foyzur/gpdb,atris/gpdb,adam8157/gpdb,xinzweb/gpdb,royc1/gpdb,rvs/gpdb,atris/gpdb,lintzc/gpdb,Postgres-XL/Postgres-XL,jmcatamney/gpdb,cjcjameson/gpdb,CraigHarris/gpdb,50wu/gpdb,ashwinstar/gpdb,royc1/gpdb,techdragon/Postgres-XL,lintzc/gpdb,ahachete/gpdb,snaga/postgres-xl,lintzc/gpdb,janebeckman/gpdb,edespino/gpdb,zaksoup/gpdb,oberstet/postgres-xl,Chibin/gpdb,Chibin/gpdb,0x0FFF/gpdb,lisakowen/gpdb,lpetrov-pivotal/gpdb,Quikling/gpdb,Chibin/gpdb,xuegang/gpdb,ashwinstar/gpdb,CraigHarris/gpdb,atris/gpdb,chrishajas/gpdb,kaknikhil/gpdb,techdragon/Postgres-XL,ahachete/gpdb,Quikling/gpdb,rvs/gpdb,ashwinstar/gpdb,Chibin/gpdb,0x0FFF/gpdb,postmind-net/postgres-xl,atris/gpdb,cjcjameson/gpdb,postmind-net/postgres-xl,edespino/gpdb,jmcatamney/gpdb,cjcjameson/gpdb,kaknikhil/gpdb,chrishajas/gpdb,oberstet/postgres-xl,randomtask1155/gpdb,adam8157/gpdb,ashwinstar/gpdb,arcivanov/postgres-xl,atris/gpdb,chrishajas/gpdb,tangp3/gpdb,rvs/gpdb,kmjungersen/PostgresXL,adam8157/gpdb,foyzur/gpdb,adam8157/gpdb,tangp3/gpdb,lintzc/gpdb,tangp3/gpdb