function _removeMessages(vMessages, bOnlyValidationMessages) {
		var mProcessors = _getAffectedProcessors(vMessages);

		if (!vMessages || (Array.isArray(vMessages) && vMessages.length == 0)) {
			return;
		} else if (Array.isArray(vMessages)) {
			// We need to work on a copy since the messages reference is changed by _removeMessage()
			var aOriginalMessages = vMessages.slice(0);
			for (var i = 0; i < aOriginalMessages.length; i++) {
				if (!bOnlyValidationMessages || aOriginalMessages[i].validation) {
					_removeMessage(aOriginalMessages[i]);
				}
			}
		} else if (vMessages instanceof Message && (!bOnlyValidationMessages || vMessages.validation)){
			_removeMessage(vMessages);
		} else {
			//map with target as key
			for (var sTarget in vMessages) {
				_removeMessages(vMessages[sTarget], bOnlyValidationMessages);
			}
		}
		_updateMessageModel(mProcessors);
	}
Like sap.ui.core.Messaging#removeMessage but with an additional argument to only remove validation
messages.

@param {sap.ui.core.message.Message|sap.ui.core.message.Message[]} vMessages - The message(s) to be removed.
@param {boolean} bOnlyValidationMessages - If set to true only messages that have been added due to validation
       errors are removed.
@private