fix for NH-2053 Extend the filter-def usage to subclasses
1. filter should apply to subclass not superclass
2. add test case