optimise intersection of ranges with the same value
This caught a bug in a feature I backed out, but still is a worthwhile test to include
use a instead of allocator consistent with the rest of the code