title: The multi-part identifier could not be bound - SubQuery
body: <p>Schema:</p>
  
  <pre><code>create table TableA (A1 int)
  create table TableB (B1 int, B2 int)
  create table TableC (C1 int)
  </code></pre>
  
  <p>Problematic query:</p>
  
  <pre><code>SELECT * 
  FROM TableA a
  INNER JOIN TableB b ON b.B1=a.A1
  INNER JOIN (SELECT TOP 1 * 
              FROM TableC c
              WHERE c.C1=b.B1 ORDER BY c.C1) d ON d.C2=b.B2
  INNER JOIN OtherTable ON OtherTable.Foo=d.C1
  </code></pre>
  
  <p>Building this schema and running the query in SQLFiddle under SQL Server 2008 results in:</p>
  
  <pre><code>The multi-part identifier "b.B1" could not be bound.: SELECT * FROM TableA a INNER JOIN TableB b ON b.B1=a.A1 INNER JOIN (SELECT TOP 1 * FROM TableC c WHERE c.C1=b.B1 ORDER BY c.C1) d ON d.C2=b.B2
  </code></pre>
  
  <p><strong>Using CROSS APPLY instead of INNER JOIN for the subquery fixes the issue</strong></p>
  
  <p>What's the problem?    </p>
  
  <p>Edit: I added "TOP 1" that was part of the real query and it's a relevant part of the problem.</p>
  
  <p>Edit2: Further information about the problem.</p>