Each of these event lists are in order but the time steps between the events are not consistent between the lists. If you check the event.frame for each paired event you will quickly see that they get out of sync. This approach will cause events to be parsed in a non-chronological order.

The best/easiest thing to do here is to just loop through ``replay.events`` which has all of the events in chronological order. There are very few non-tracker/game events in the replay so the extra loops will probably hurt less than creating a new sorted list.