Fix remove_duplicate_events bug

Fixes #10 (reported by Uffe Amelung Fredens)