Refine child filter logic in util.forEachFilter