First version (!719 (merged)) had a bug, but it only became apparent after it was merged and used in Athena. The merge deleted the source branch, so I'm starting again here.
Motivation remains the same: fixing an intermittent issue documented here: https://its.cern.ch/jira/browse/ATEAM-471
An EventContext pointer had the potential to be used after deletion. Since the pointer wasn't really necessary I've refactored the updateStates() method to avoid it.