I see (sort of). It does seem like the "proper" fix might be to fix whatever is generating the panic message, although I can see this might be a reasonable temporary solution.
I find the fix rather elegant, to be honest. Great use of specialization, which std is allowed to use. The only other options I can think of how to implement this would be to pass the is_set flag as argument (I haven't checked how long the call-chain from BTreeSet::range down to NodRef::search_tree_for_bifurcation is) or implement BTreeSet not as a BTreeMap with no values (which sounds like a lot of duplicated code no one would like to maintain).
I didn't understand is_set either and still don't! Sure, I expect BTreeSet to be a wrapper around BTreeMap, although the public methods are somewhat different.