Added union message handling to MessageOutput and FlashMessageOutput.