Using a single smart rule instead of Hazel (maybe)

@chrillek

const groupFound = app.search(`name: ${group} kind:group kind:!tag`, {in: app.databases[db]});

I’m using the same group name multiple times (e.g. I have the subgroup Documents in each project group).

Is there a way to restrict the search for a group when using the same group name multiple times? Can I include the parent group in the search?