title: UICollectionView with custom UICollectionViewLayout validateLayoutInRect accertion
body: <p>I'm creating app with collection view with custom collection view layout. All works fine until one cell removed. After [collectionView reloadData] all seems good. But after collection view scrolls application crashes with assertion.</p>
  
  <pre><code>Assertion failure in -[UICollectionViewData validateLayoutInRect:]
  Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UICollectionView received layout attributes for a cell with an index path that does not exist: &lt;NSIndexPath: 0xc000000000060016&gt; {length = 2, path = 0 - 12}
  </code></pre>
  
  <p>I already dug into many answers on stackOverflow, trying many things but still can't get rid of this problem.</p>
  
  <p>Small example project with my custom layout and this problem I uploaded here:</p>
  
  <p><a href="https://github.com/fizzy871/collViewBugTest" rel="nofollow noreferrer">https://github.com/fizzy871/CollectionViewCustomLayoutBugFix</a></p>
  
  <p>There is collection view and "remove cell" button which removes last cell and produce that crash.</p>
  
  <p>Please, who knows why it happens or have some ideas, help me with this problem.</p>
  
  <p><a href="https://i.stack.imgur.com/TIFwy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TIFwy.png" alt="enter image description here"></a></p>