Error: -Index was out of range- during TM lookup

While I'm translating in Studio 2015, I sometimes get the following error message:

"Index was out of range"

I've pasted the more detailed error description here (redacted for local computer user name):

<SDLErrorDetails time="2016-08-17 11:53:49">
  <ErrorMessage>Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index</ErrorMessage>
  <Exception>
    <Type>System.ArgumentOutOfRangeException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</Type>
    <ParamName>index</ParamName>
    <HelpLink />
    <Source>mscorlib</Source>
    <HResult>-2146233086</HResult>
    <StackTrace><![CDATA[   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at Sdl.LanguagePlatform.TranslationMemoryTools.EditDistanceClassifier.Execute()
   at Sdl.LanguagePlatform.TranslationMemoryTools.MarkupDataEditDistanceApplier.Execute(ISegment markupDataSegment, IList`1 tokenRanges, MarkupDataAs markupDataIs)
   at Sdl.TranslationStudio.Editor.TranslationMemory.TranslationMemoryViewPartControl.TranslationMemoryViewPartControl_MarkupSegment(SearchResult searchResult, Segment linguaSegment, ISegment markupDataSegment, IDocumentItemFactory itemFactory, Boolean source, Boolean isMemoryTranslationUnit)
   at Sdl.TranslationStudio.Editor.TranslationMemory.CompoundTranslationMemorySearchResultsControl._searchResultsControl_MarkupSegment(Object sender, MarkupSegmentEventArgs e)
   at Sdl.TranslationStudio.Common.TranslationMemory.SearchResultTranslationMemoryControl.InvokeMarkupSegment(MarkupSegmentEventArgs e)
   at Sdl.TranslationStudio.Common.TranslationMemory.SearchResultTranslationMemoryControl.DoMarkupSegment(SearchResultTranslationUnitItem tu, Segment segment, ISegment markupDataSegment, IDocumentItemFactory itemFactory, Boolean isSource)
   at Sdl.TranslationStudio.Common.TranslationMemory.AbstractTranslationMemoryControl`1.CreateTranslationUnitParagraphs(IList`1 tus, IDocumentProperties documentProperties, IBilingualDocumentWriter writer)
   at Sdl.TranslationStudio.Common.TranslationMemory.AbstractTranslationMemoryControl`1.CreateParagraphs(IList`1 tus)
   at Sdl.TranslationStudio.Common.TranslationMemory.AbstractTranslationMemoryControl`1.ShowTranslationUnits(IList`1 tus)
   at Sdl.TranslationStudio.Common.TranslationMemory.SearchResultTranslationMemoryControl.ShowTranslationUnits(IList`1 tus)
   at Sdl.TranslationStudio.Common.TranslationMemory.AbstractTranslationMemoryControl`1.set_TranslationUnits(IList`1 value)
   at Sdl.TranslationStudio.Editor.TranslationMemory.CompoundTranslationMemorySearchResultsControl.SetSearchResults(SearchResults searchResults)
   at Sdl.TranslationStudio.Editor.TranslationMemory.CompoundTranslationMemorySearchResultsControl.SetSearchResults(SearchResults searchResults, IEnumerable`1 cascadeMessages)
   at Sdl.TranslationStudio.Editor.TranslationMemory.TranslationMemoryViewPartControl.UpdateContent()
   at Sdl.TranslationStudio.Editor.TranslationMemory.TranslationMemoryViewPartControl.TranslationJob_StatusChanged(IJob job)
   at Sdl.Desktop.Platform.Services.JobEventHandler.Invoke(IJob job)
   at Sdl.Desktop.Platform.Implementation.Services.Job.OnStatusChanged()
   at Sdl.Desktop.Platform.Implementation.Services.Job.SetStatus(JobStatus status)
   at Sdl.Desktop.Platform.Implementation.Services.Job._worker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
   at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)]]></StackTrace>
  </Exception>
  <Environment>
    <ProductName>SDL Trados Studio</ProductName>
    <ProductVersion>12.0.0.0</ProductVersion>
    <EntryAssemblyFileVersion>12.2.5141.6</EntryAssemblyFileVersion>
    <OperatingSystem>Microsoft Windows 10 Home Single Language</OperatingSystem>
    <ServicePack>NULL</ServicePack>
    <OperatingSystemLanguage>1033</OperatingSystemLanguage>
    <CodePage>1252</CodePage>
    <LoggedOnUser>--REDACTED--</LoggedOnUser>
    <DotNetFrameWork>4.0.30319.42000</DotNetFrameWork>
    <ComputerName>TOBI-ACER2</ComputerName>
    <ConnectedToNetwork>True</ConnectedToNetwork>
    <PhysicalMemory>12495304 MB</PhysicalMemory>
  </Environment>
</SDLErrorDetails>

Sometimes the error goes away if I close and reopen the sdlxliff, sometimes after I restart the whole application. But this time even that doesn't help. This is a problem, because I don't get access to the three already existing matches in TM. Good, though, that next phrase still seems to get retreived normally.


I hope this bug gets found and fixed. I can try and keep this package for reference, if needed to reproduce the error.

------------------------------------------------------

Update: Tried "View -> Reset Windows Layout". That doesn't help. When I go back and select on of the specific, problematic TU:s (#361 "100% quality, 100% service") I get the same error message again.  To me this looks more like an issue with the interaction with the TM.

By the way, this project has 7 file TM:s attached.