cherry-pick duplicate event fix for testing