Fixed possible issue with script event lists being indexed out of range.