title: Entity Framework EF returns null list in some occasions (eager loading)
body: <p>EF sometimes returns a null list instead of an empty list. This doesn't always happen but might have to do with EF's caching system.</p>
  
  <p>I'm eager loading related entities in a one to many relationship. Trying to get POFreezes list loaded. </p>
  
  <p>Ran into a problem where when <strong>two RMALines with the same POFreeze</strong>. </p>
  
  <ul>
  <li><p>The 1st RMALine's relationships are populated just fine. </p></li>
  <li><p>The 2nd RMALine's relationships (POFreeze list) are returned as null.</p></li>
  </ul>
  
  <p>Checked database and the record exists. </p>
  
  <p>I ran SQL Profiler and ran the query that EF is producing and the records being returned are correct. The POFreeze is being returned.</p>
  
  <pre><code>            return await _context.RMALines
                          .Where(c =&gt; c.Approved == 0)
                          .Include(c =&gt; c.CPSOLine.SOLine.POFreezes)
                          .OrderBy(c =&gt; c.RMAKey)
                          .ToListAsync();
  </code></pre>
  
  <p>Any idea of why i'm getting a null List returned instead of an empty one?</p>