Backport of leader changed publication, see #3017