View: fix "eventIndexes" being set as global variable