Exception handling in multi-master setup.

Refs #10732

I'm not entirely positive how this regression was introduced but simply catching the end of the iteration and continuing handles both multi-master and single-master in my testing. This should probably go through an entire Jenkins run before being committed but does seem to restore multi-master functionality.

@basepi If this gets merged, it should be cherry-picked.