Delphi XE8 bug in TList, need workaround

I found that now the TList<T>.Insert method call TListHelper.InternalInsertX depends on the data size, in my case: procedure TListHelper.InternalInsertN(AIndex: Integer; const Value); var ElemSize: Integer; begin CheckInsertRange(AIndex); InternalGrowCheck(FCount + 1); ElemSize := ElSize; if AIndex <> FCount then Move(PByte(FItems^)[AIndex * ElemSize], PByte(FItems^)[(AIndex * ElemSize) + 1], (FCount – AIndex) * ElemSize); Move(Value, PByte(FItems^)[AIndex * ElemSize], … Read more