title: BigQuery union is failing when trying to union 2 subqueries that include join operation
body: <p>We are trying to union 2 subqueries and getting error.
  Here is the query:</p>
  
  <pre><code>select *
  from
  (select  TRANS_SEQ, TRANS_TS
  from [X.ls_transaction] ls
  left join each (select * from [X.resident_s] where date(eff_end_ts) = date('9999-12-31')) rs on ls.source_resident_key=rs.resident_key
  where date(trans_ts) = date('2015-07-31')) a,
  (select TRANS_SEQ, TRANS_TS,
  from [X.ld_transaction] ld
  left join each (select * from [X.resident_d] where date(eff_end_ts) = date('9999-12-31')) rs on ld.source_resident_key=rs.resident_key
  where date(trans_ts) = date('2015-07-31')) b
  limit 1;
  </code></pre>
  
  <p>Here is the error it returns:</p>
  
  <blockquote>
    <p>Error: Union results in ambiguous schema. [TRANS_SEQ] is ambiguous and
    is aliasing multiple fields. Aliased fields:
    ld.TRANS_SEQ,ls.TRANS_SEQ,</p>
  </blockquote>
  
  <p>If I take both of the joins from the subquery out then the union works.<br>
  Is this a bug?</p>
  
  <p>Thanks</p>