[filter] fix a filtering bug during tailing