I don't either.  This is what the old code did so I did this to maintain whatever interface it assumes and didn't try to attempt to understand the why (you can see this same logic was originally inside of discover_inner

I also made no attempt to figure out if it is actually a test-only codepath (of which the naming is certainly ambiguous!).