daemon: minor filtering logic refactoring