Fixing bug #8362

Fixes intersection bug in the case of non-monotonic non-unique indexes. See bug #8362