How to solve "Exception: Violation for language value" during Upgrade process?

I'm using the CliUpgrade.php script to upgrade my instance, but I'm getting following error while upgrading to v11:

Starting script 7_RenameModules
ERROR: Exception: Violation for language value
Finished script 7_RenameModules
I looked at the upgrade script 7_RenameModules.php, the script fails at line 36:
$strings = $this->getAppListStrings($langKey);
The method getAppListStrings is defined in the same file on lines 149-157:
* @param string $lang
* @return array
protected function getAppListStrings($lang)
   return return_app_list_strings_language($lang, false);
The method return_app_list_strings_language is defined in the include\utils.php and executes a language validation at line:
$violations = Validator::getService()->validate($lang, new Language());
if ($violations->count() > 0) {
throw new ViolationException(
'Violation for language value',
which throws the Exception above.

I get this error on each upgrade process (v9 -> v10, v10 -> v11) and when I rerun the CliUpgrade.php script with the -S continue argument the upgrade process succeeds without any errors.

Any suggestions on how to solve this? Because it is annoying and irritating.

Thank you in advance.