#478: Additions and mods to filtering by rules.