PHOENIX-927 Support derived tables in joins