Allow method chaining on MessageBag->setFormat. Closes #1580.
Merge branch '4.0'