title: Illogical ArgumentOutOfRangeException in ObservableCollection with index within range
body: <p>I'm using an <code>ObservableCollection</code> (<code>_queue</code>) as a queue to show a stream of items. I have a non-async <code>next</code> method with the following relevant code fragment:</p>
  
  <pre><code>if (_queue.Count &gt; 0) {
      try {
          playingTrack = _queue[0];
          _queue.RemoveAt(0);
      }
      catch (Exception e) {
          Debug.WriteLine("Failed to remove first of queue size="+_queue.Count);
      }
  }
  </code></pre>
  
  <p>Note the (temporary) general catch which should not be necessary. I tend to catch the <code>ArgumentOutOfRangeException</code> thrown by <code>RemoveAt</code> seemingly at random, even though the index zero should be valid given the preceding condition and that the indexing succeeded. Even so, the debug message always shows up showing a size > 0. The exception has happened so far only when the above method was called by <code>MediaElement.MediaEnded</code> all within the UI thread.</p>
  
  <p>After reading up and down on msnd I still haven't found any documentation about this behavior. Does anybody have an idea of what could be happening here?</p>