Bugfix for #1579 - avoid iterating over None when lang_codes === None