The filter implementation now takes permutations into account - still got one outstanding test failure.