Stop at `collectFirst()` at the end. I can probably extract the gut in a separate function to make it easier to follow.