When some resource types were present, but not all of them, we were ending up in a situation where we would fail to initialize the `FirstX` variables and get incorrect iterators. Fixes #128560.
When some resource types were present, but not all of them, we were ending up in a situation where we would fail to initialize the `FirstX` variables and get incorrect iterators. Fixes #128560.