## Bug description

When you create a trend with two lines, one of which is say $pageview with a filter of browser = chrome and the other is ALSO $pageview but a different filter.

If you click on any the line you get the same users in the persons modal, even if you switch the trend line toggle in the modal.

## How to reproduce

1. Create a new trend
2. Add a $pageview trendline, and another $pageview trendline with a subfilter
3. Click on any of the lines
4. Open the persons modal and switch between the trend lines in the persons modal

## Environment

- [x] PostHog Cloud
- [ ] self-hosted PostHog (ClickHouse-based), version/commit: _please provide_
- [ ] self-hosted PostHog (Postgres-based, legacy), version/commit: _please provide_

## Additional context



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

posthog/api/utils.py
"""
    Based on a token associated with a Team, retrieve the context that is
    required to ingest events.
    """
    try:
        team_id, anonymize_ips = Team.objects.values_list("id", "anonymize_ips").get(api_token=token)
        
        
        
        anonymize_ips = cast(bool, anonymize_ips)
        return EventIngestionContext(team_id=team_id, anonymize_ips=anonymize_ips)
    except Team.DoesNotExist:
        return None
def get_event_ingestion_context_for_personal_api_key(
    personal_api_key: str, project_id: int
) -> Optional[EventIngestionContext]:
    """
    Some events use the personal_api_key on a `User` for authentication, along
    with a `project_id`.
    """
    user = User.objects.get_from_personal_api_key(personal_api_key)
    if user is None:
        return None
    try:
        team_id, anonymize_ips = user.teams.values_list("id", "anonymize_ips").get(id=project_id)
        return EventIngestionContext(team_id=team_id, anonymize_ips=anonymize_ips)
    except Team.DoesNotExist:
        return None
def check_definition_ids_inclusion_field_sql(