Verify that the current node is still master before the reroute is executed and if that isn't the case skip reroute
Invoke listener when reroute fails.

Closes #6244