This method was introduced in #12852. It is using the `state_key` column from the `events` table, which is not (yet) reliable (see #11496).