## Bug description
Breakdown seems to not working properly when the test filter switch is toggled on.



## Expected behavior

Expect breakdown by realm to work since the filter @ event level works. Also it seems to work if test users are not excluded.


## How to reproduce

1. Go to this [chart](https://app.posthog.com/insights?insight=TRENDS&display=ActionsLineGraph&actions=%5B%7B%22id%22%3A4912%2C%22name%22%3A%22Discovered%20Learning%22%2C%22type%22%3A%22actions%22%2C%22order%22%3A0%2C%22math%22%3A%22dau%22%7D%5D&events=%5B%5D&filter_test_accounts=true&new_entity=%5B%5D&breakdown=false&breakdown_type&date_from=-30d&interval=week&properties=%5B%7B%22key%22%3A%22realm%22%2C%22value%22%3A%5B%22cloud%22%2C%22hosted%22%5D%2C%22operator%22%3A%22exact%22%2C%22type%22%3A%22person%22%7D%5D) – observe the filter by realm on the events.

2. Go to the same chart, with a [breakdown instead](https://app.posthog.com/insights?insight=TRENDS&display=ActionsLineGraph&actions=%5B%7B%22id%22%3A4912%2C%22name%22%3A%22Discovered%20Learning%22%2C%22type%22%3A%22actions%22%2C%22order%22%3A0%2C%22math%22%3A%22dau%22%7D%5D&events=%5B%5D&filter_test_accounts=true&new_entity=%5B%5D&breakdown=realm&breakdown_type=person&date_from=-30d&interval=week&properties=%5B%5D) -- Observe no data

3. [Disable the test filter, apply the breakdown](https://app.posthog.com/insights?insight=TRENDS&display=ActionsLineGraph&actions=%5B%7B%22id%22%3A4912%2C%22name%22%3A%22Discovered%20Learning%22%2C%22type%22%3A%22actions%22%2C%22order%22%3A0%2C%22math%22%3A%22dau%22%7D%5D&events=%5B%5D&filter_test_accounts=false&new_entity=%5B%5D&breakdown=realm&breakdown_type=person&date_from=-30d&interval=week&properties=%5B%5D) - data seen 
## Environment

- [ ] PostHog Cloud
- [ ] self-hosted PostHog, version/commit: _please provide_

## Additional context



#### *Thank you* for your bug report – we love squashing them!

ee/clickhouse/models/action.py
if step.event == AUTOCAPTURE_EVENT:
            from ee.clickhouse.models.property import filter_element  
            el_conditions, element_params = filter_element(
                model_to_dict(step), "{}_{}{}".format(action.pk, index, prepend)
            )
            params = {**params, **element_params}
            conditions += el_conditions
        
        event_conditions, event_params = filter_event(step, "{}_{}{}".format(action.pk, index, prepend), index)
        params = {**params, **event_params}
        conditions += event_conditions
        if step.properties:
            from ee.clickhouse.models.property import parse_prop_clauses
            prop_query, prop_params = parse_prop_clauses(
                Filter(data={"properties": step.properties}).properties,
                team_id=action.team.pk if filter_by_team else None,
                prepend="action_props_{}_{}".format(action.pk, step.pk),
            )
            conditions.append(prop_query.replace("AND", "", 1))
            params = {**params, **prop_params}
        if len(conditions) > 0:
            or_queries.append(" AND ".join(conditions))
    if use_loop:
        formatted_query = "SELECT uuid FROM events WHERE {} AND team_id = %(team_id)s".format(
            ") OR uuid IN (SELECT uuid FROM events WHERE team_id = %(team_id)s AND ".join(or_queries)
        )
    else:
        formatted_query = "(({}))".format(") OR (".join(or_queries))
    return formatted_query, params
def filter_event(step: ActionStep, prepend: str = "event", index: int = 0) -> Tuple[List[str], Dict]: