anchor.diff:                  Name = lessonName
               }
           let createdLessonRecord = { lessonRecord with ID = db.CreateOrUpdateLesson(lessonRecord) }
  -        (createdLessonRecord, new MemoryStream(File.ReadAllBytes(fp)) :> Stream)
  +        (createdLessonRecord, fp.Substring(languagePath.Length), new MemoryStream(File.ReadAllBytes(fp)) :> Stream)
   
  -    let wrappedGenerateCardsForXmlStream(language: string)(lesson: LessonRecord, stream: Stream) = 
  +    let wrappedGenerateCardsForXmlStream(language: string)(lesson: LessonRecord, keyRoot: string, stream: Stream) = 
           try
               try
  -                generateCardsForXmlStream(lesson, language, stream)
  +                generateCardsForXmlStream(lesson, language, keyRoot, stream)
               with
               | ex -> [||]
           finally
  
positive.code:     | true -> stripFormattingCodes(key, value.Remove(r.Index, r.Length))
      | _ -> (key, value)
  
  let internal generateCardsForWorkbook(language: string)(lessonID: int, doc: XElement) = 
      let makeTupleOfWorksheetAndName(worksheetElement: XElement) = 
          let worksheetName = worksheetElement.Attribute(XName.Get("Name", ssNs)).Value
          (worksheetElement, worksheetName)
  
      doc.Descendants(XName.Get("Worksheet", officeNs))
      |> Seq.map makeTupleOfWorksheetAndName
      |> Seq.collect (fun (ws, name) -> AssemblyResourceTools.createCardRecordForStrings(lessonID, name, language, "masculine")(getFirstTwoColumnsForWorksheet(ws) |> Seq.map stripFormattingCodes |> Map.ofSeq))
      |> Array.ofSeq
  
  let internal generateCardsForXmlStream(lesson: LessonRecord, language: string, stream: Stream) = 
      let xel = XElement.Load(stream)
      generateCardsForWorkbook(language)(lesson.ID, xel)
  
  /// <summary>
  /// Generates a set of cards for a single localization XML file.
  
negative.code: let internal generateCardsForXml(lessonID: int, language: string)(xmlContent: string) = 
      use stringReader = new StringReader(xmlContent)
      let xel = XElement.Load(stringReader)
      generateCardsForWorkbook(language, "")(lessonID, xel)
  
  let internal generateCardsForLanguage(db: LLDatabase, gameID: int)(languagePath: string) = 
      let languageMap =
  