Handle the case when _messages is empty in getMessages() and parameter byItemName is false to return an empty messageGroup instead of throwing an exception saying "messages is not iterable".
In phalcon 1.3 the case was cleanly handled.