Sentry Issue: [POSTHOG-355](https://sentry.io/organizations/posthog/issues/2486864883/?referrer=github_integration)

```
Cohort.DoesNotExist: Cohort matching query does not exist.
(4 additional frame(s) were not displayed)
...
  File "ee/clickhouse/queries/sessions/list.py", line 155, in format_action_filters
    condition_sql, filter_params = format_action_filter_aggregate(entity, prepend=f"event_matcher_{index}")
  File "ee/clickhouse/queries/sessions/list.py", line 176, in format_action_filter_aggregate
    filters, filter_params = parse_prop_clauses(entity.properties, prepend=prepend, team_id=None)
  File "ee/clickhouse/models/property.py", line 41, in parse_prop_clauses
    cohort = Cohort.objects.get(pk=prop.value, team_id=team_id)
  File "django/db/models/manager.py", line 85, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "django/db/models/query.py", line 429, in get
    raise self.model.DoesNotExist(
```
posthog/api/test/test_event.py
event_factory(team=self.team, event="action {}".format(i), distinct_id=str(i + 3))
            response = self.client.get("/api/event/sessions/?date_from=2012-01-14&date_to=2012-01-17",).json()
            self.assertEqual(len(response["result"]), SESSIONS_LIST_DEFAULT_LIMIT)
            self.assertIsNone(response.get("pagination"))
            for i in range(2):
                with freeze_time(relative_date_parse("2012-01-15T04:01:34.000Z") + relativedelta(hours=i + 46)):
                    event_factory(team=self.team, event="action {}".format(i), distinct_id=str(i + 49))
            response = self.client.get("/api/event/sessions/?date_from=2012-01-14&date_to=2012-01-17",).json()
            self.assertEqual(len(response["result"]), SESSIONS_LIST_DEFAULT_LIMIT)
            self.assertIsNotNone(response["pagination"])
        def test_event_sessions_by_id(self):
            another_team = Team.objects.create(organization=self.organization)
            Person.objects.create(team=self.team, distinct_ids=["1"])
            Person.objects.create(team=another_team, distinct_ids=["1"])
            with freeze_time("2012-01-14T03:21:34.000Z"):
                event_factory(team=self.team, event="1st action", distinct_id="1")
                event_factory(team=self.team, event="1st action", distinct_id="2")
            with freeze_time("2012-01-14T03:25:34.000Z"):
                event_factory(team=self.team, event="2nd action", distinct_id="1")
                event_factory(team=another_team, event="2nd action", distinct_id="1")
                event_factory(team=self.team, event="2nd action", distinct_id="2")
            with freeze_time("2012-01-15T03:59:35.000Z"):
                event_factory(team=self.team, event="3rd action", distinct_id="1")
            with freeze_time("2012-01-15T04:01:34.000Z"):
                event_factory(team=self.team, event="4th action", distinct_id="1", properties={"$os": "Mac OS X"})
                event_factory(team=self.team, event="4th action", distinct_id="2", properties={"$os": "Windows 95"})
            with freeze_time("2012-01-15T04:01:34.000Z"):
                response_person_1 = self.client.get("/api/event/sessions/?distinct_id=1",).json()
            self.assertEqual(len(response_person_1["result"]), 1)
        def test_events_in_future(self):