Fix resampling logic for duplicate events.
am: 086a02a25f

Change-Id: Idfbd41a7309e96bdd6caaa230a8a8124d1bbc4ba