Backported annotation event dispatcher enhancements to 6.x branch.