anchor.diff:      alangs := v as TJSONArray;
       olangs := TJSONObject.Create;
       try
  -      o := TJSONObject.Create;
  -      try
  -        for i := 0 to alangs.Count - 1 do
  -        begin
  -          id := alangs.Items[i].Value;
  -          if id = '' then
  -            continue;
  +      for i := 0 to alangs.Count - 1 do
  +      begin
  +        id := alangs.Items[i].Value;
  +        if id = '' then
  +          continue;
  +
  +        o := TJSONObject.Create;
  +        try
  +          olangs.AddPair(id, o);
             AddSubtagNames(id, o);
  -          olangs.AddPair(id, o);
  +        finally
  +          o.Free;
           end;
  -
  -        json.RemovePair(TKeyboardInfoFile.SLanguages);
  -        json.AddPair(TKeyboardInfoFile.SLanguages, olangs);
  -      finally
  -        Free;
         end;
  +
  +      json.RemovePair(TKeyboardInfoFile.SLanguages);
  +      json.AddPair(TKeyboardInfoFile.SLanguages, olangs);
  +
  +      // Migration complete and subtags populated
  +      Exit;
       finally
  -      Free;
  -    end;
  -
  -    // Migration complete and subtags populated
  -    Exit;
  +      olangs.Free;
  +    end;
     end;
   
     {
  
positive.code:   v := o.Values[TKeyboardInfoFile.SRegionName];
    if not Assigned(v) and (regionName <> '') then
      o.AddPair(TKeyboardInfoFile.SRegionName, regionName);
  end;
  
  function TMergeKeyboardInfo.CheckOrMigrateLanguages: Boolean;
  
negative.code:   if id = '' then
      Exit;
    with TBCP47Tag.Create(id) do
    try
      TLanguageCodeUtils.BCP47Languages.TryGetValue(Language, languageName);
      TLanguageCodeUtils.BCP47Scripts.TryGetValue(Script, scriptName);
      TLanguageCodeUtils.BCP47Regions.TryGetValue(Region, regionName);
    finally
      Free;
    end;
  
    displayName := TLanguageCodeUtils.LanguageName(languageName, scriptName, regionName);
  