Make sure every event is only read once.

Gets rid of some warnings for duplicate resource_references.