Similar to the approach for selecting subgraph edges, try running "Select Elements" multiple times. If you have "Clear Selection First" on tab "General" not marked, you will be able to incrementally increase the set of selected nodes with each run. Moreover, the selection criteria "Parents of Selected Nodes" and "Children of Selected Nodes" will allow you to select parent groups or child nodes.
E.g. for the amended example, the following approach should work:
-
Run as explained above with "Clear Selection First" not marked.
-
Run again with "Select" set to "Parents of Selected Nodes".
-
Run again with "Select" set to "Neighbors of Selected Nodes".
For more complex nesting structures, you will have to mix and match the criteria "Neighbors of Selected Nodes", "Parents of Selected Nodes", and "Children of Selected Nodes".