Fixes wrong behavior when using filter on multi-segment index