Fix test script to avoid spurious differences due to trying to compare more events than are in files.