That's a smart refactoring. You find your way by considering that only attributes determine the behaviour of the filter. That's a totally acceptable compromise from my point of view.

One caveat though : the filter applies at the end. Shoudln't we apply the filter first when it exists ?