Fixed OpDialogue hangs caused by lots of messages.

An Op being run in a background thread can queue up messages at a rate of knots, causing MessageWidget.appendMessage() to be called recursively from the processEvents() method used to update the UI. Guarding against the recursion allows us to keep the UI updated without running out of stack.