Esme Povirk (@madewokherd) commented about dlls/uiautomationcore/uia_client.c:
*/ static HRESULT traverse_uia_node_tree(HUIANODE huianode, struct UiaCondition *view_cond, struct UiaCondition *search_cond, struct UiaCondition *pre_sibling_nav_stop_cond,
struct UiaCondition *ascending_stop_cond, int traversal_opts, BOOL at_root_level, int max_depth, int *cur_depth,
HUIANODE *out_node)
struct UiaCondition *ascending_stop_cond, int traversal_opts, BOOL at_root_level, BOOL exclude_root,
BOOL *root_found, int max_depth, int *cur_depth, HUIANODE *out_node)
I think this can be reduced to a single argument, with *root_found starting out as FALSE if exclude_root is FALSE.