By iterating backwards over the globs we can exit the loop as soon as we find a match.
While we're here:
- Regex doesn't need to be mutable.
- We can reserve the amount of Globs needed ahead of time.
- Using a SmallVector with size 0 is slightly more space efficient than a std::vector.
I'd appreciate a comment here that mentions *why* reversing backwards means we can early return. It took me a few tries to remember that glob patterns can undo earlier glob patterns, so that the last pattern is the one that matters.