Fixed an issue with logical filter chain.
Added filter test.