Ext's event model is so messed up that I can inadvertantly trigger another run of event processing whilst in the middle of event processing. It means that new events can be triggered and handled whilst half way through processing the current set of events. This is what is happening:
Event handler invoked
Mid way through some code causes Ext to do an event run
Event handler invoked again
Event dealt with
Event dealt with
In terms of what I'm dealing with, I get duplicates in the list, because the list is cleared before the event handler is invoked the second time:
List cleared
List cleared
Item added
Item added
Item added
Item added
Yeah, that qualifies as bullshit. Gonna have to patch Ext or cruft up your codes with a mutex or...
REFACTOR ALL THE THINGS