title: UICollectionView crashes with error: "Attempted to scroll the collection view to an out-of-bounds item"
body: <p>I'm receiving an error in regards to a <code>UICollectionView</code> that I have not received prior to updating to Xcode 13.2. In the application, I have a view that contains multiple <code>UICollectionViews</code> each one having a different number of cells but all having a cell count over or equal to 3. The issue comes into play when the user selects an item in one of the <code>CollectionViews</code> that is beyond the second item in that specific <code>collectionView</code>.  When functioning correctly, upon selection of a cell a new view should appear.  The app functions as intended when the user selects either the first or second cell in the collectionView but fails to present the new view and crashes when the user selects any cell beyond that.  Here's the error:</p>
  <blockquote>
  <p>Thread 1: &quot;Attempted to scroll the collection view to an out-of-bounds item (5) when there are only 3 items in section 0.</p>
  </blockquote>
  <p>This error is strange for multiple reasons.  One being that the <code>collectionView</code> I'm selecting the cell on has 5 items not 3 (which I verify by running: <code>print(&quot;\(CollectionView1.numberOfItems(inSection: 0))&quot;)</code> which outputs 5), another being that the error only appears upon selection of a cell not when scrolling to a cell like the error suggests, and finally this issue seemed to spontaneously appear upon updating to Xcode 13.2, prior to the update everything was functioning fine.</p>