The problem with my code was that it was missing a bit that I'd previously realized I'd need, but that I'd forgotten about. It's a pretty subtle omission.
So, where am I now?
Well, every valid test that I have thought of is passing. For all I know, I'm missing some edge case functionality still. There are some implementation decisions that I've punted on, and I want to circle back to them now. Specifically, what fields of a URL should be considered, when it comes to determining equality? I think it would be a bad idea to just pick an answer here myself and just go ahead, because it's much easier to change this feature now, than it will be after it's merged.
Anyway, I've also got to, let's see... NEWS entry, update documentation, what are other PRs like... Not seeing anything else that it looks like I should add, but I do still need to work on those.
Now that it feels like I'm over the hump, in terms of implementation, I'm going to touch base in the issue. In the coming days, I'm going to work on improving the code organization and style; what I have now is kind of just "the minimum required to make the things I've thought of work", and the result is some unprincipled additions to the codebase. For now, though, I want to cool off a bit.