Check against HierarchicalRoleInterface instead of RecursiveIterator