title: ICollectionView's SourceCollection is null
body: <p>I have a ViewModel with two <code>ICollectionView</code>s which are bound as <code>ItemsSource</code>s to two different <code>ListBox</code>es. Both wrap the same <code>ObservableCollection</code>, but with different filters. Everything works fine initially and both ListBoxes appear properly filled.</p>
  
  <p>However when I change an item in the ObservableCollection and modify a property which is relevant for filtering, the ListBoxes don't get updated. In the debugger I found that SourceCollection for both ICollectionVIews is null although my ObservableCollection is still there.</p>
  
  <p>This is how I modify an item making sure that the ICollectionViews are updated by removing and adding the same item:</p>
  
  <pre><code>private void UnassignTag(TagViewModel tag)
  {
      TrackChangedTagOnCollectionViews(tag, t =&gt; t.IsAssigned = false);
  }
  
  private void TrackChangedTagOnCollectionViews(TagViewModel tag, Action&lt;TagViewModel&gt; changeTagAction)
  {
      _tags.Remove(tag);
  
      changeTagAction.Invoke(tag);
  
      _tags.Add(tag);
  }
  </code></pre>
  
  <p>The mechanism works in another context where I use the same class.</p>
  
  <p>Also I realized that the problem disappears if I register listeners on the ICollectionViews' CollectionChanged events. I made sure that I create and modify them from the GUI thread and suspect that garbage collection is the problem, but currently I'm stuck... Ideas?</p>
  
  <p><strong>Update:</strong></p>
  
  <p>While debugging I realized that the SourceCollections are still there right before I call <code>ShowDialog()</code> on the WinForms Form in which my UserControl is hosted. When the dialog is shown they're gone. </p>
  
  <p>I create the ICollectionViews like this:</p>
  
  <pre><code>AvailableTags = new CollectionViewSource { Source = _tags }.View;
  AssignedTags = new CollectionViewSource { Source = _tags }.View;
  </code></pre>
  
  <p>Here's how I bind one of the two (the other one is pretty similar):</p>
  
  <pre><code>&lt;ListBox Grid.Column="0"  ItemsSource="{Binding AvailableTags}" Style="{StaticResource ListBoxStyle}"&gt;
              &lt;ListBox.ItemTemplate&gt;
                  &lt;DataTemplate&gt;
                      &lt;Border Style="{StaticResource ListBoxItemBorderStyle}"&gt;
                          &lt;DockPanel&gt;
                              &lt;Button DockPanel.Dock="Right" ToolTip="Assign" Style="{StaticResource IconButtonStyle}"
                                              Command="{Binding Path=DataContext.AssignSelectedTagCommand, RelativeSource={RelativeSource AncestorType={x:Type tags:TagsListView}}}"
                                              CommandParameter="{Binding}"&gt;
                                  &lt;Image Source="..."/&gt;
                              &lt;/Button&gt;
  
                              &lt;TextBlock Text="{Binding Name}" Style="{StaticResource TagNameTextBlockStyle}"/&gt;
                          &lt;/DockPanel&gt;
                      &lt;/Border&gt;
                  &lt;/DataTemplate&gt;
              &lt;/ListBox.ItemTemplate&gt;
          &lt;/ListBox&gt;
  </code></pre>
  
  <p>I use MvvmLight's <code>RelayCommand&lt;T&gt;</code> as <code>ICommand</code> implementation in my ViewModel:</p>
  
  <pre><code>AssignSelectedTagCommand = new RelayCommand&lt;TagViewModel&gt;(AssignTag);
  </code></pre>