Range Check Error when loading fields from package

In my objects model I have the following:

    [ManyValuedAssociation([TAssociationProp.Required], CascadeTypeAllRemoveOrphan)]
    [ForeignJoinColumn('PROFILE_ID', [TColumnProp.Required])]
    FTokens: TList<TAuthToken>;

I build a package and when I try to load this object into a TAureliusDataset I get a Range Check Error.

exception class    : ERangeError
exception message  : Range check error.

main thread ($60c):
50065a4e +02e rtl260.bpl         System         35859   +9 DynArraySetLength
50065ced +005 rtl260.bpl         System         36024   +3 @DynArraySetLength
500fc596 +07e rtl260.bpl         System.Rtti    10335   +7 DoMake
500fc761 +019 rtl260.bpl         System.Rtti    10376   +4 TRealPackage.MakeTypeLookupTable
500fc268 +01c rtl260.bpl         System.Rtti    10255   +2 TRealPackage.FindType
500ecc8c +050 rtl260.bpl         System.Rtti     4753   +5 TRttiPool.FindType
500eed83 +00f rtl260.bpl         System.Rtti     5105   +1 TRttiContext.FindType
1c6dea51 +069 tmsbcl260.bpl      Bcl                       Rtti.Utils.TRttiUtils.ExtractGenericTypes
1c6dfb1c +03c tmsbcl260.bpl      Bcl                       Rtti.Utils.TRttiUtils.ExtractGenericTypes
1c6e1c33 +053 tmsbcl260.bpl      Bcl                       Collections.IsObjectList
1d4251fa +002 aurelius260.bpl    Aurelius                  Mapping.Explorer.TMappingExplorer.IsObjectList
1d3e7f1d +07d aurelius260.bpl    Aurelius                  Mapping.Attributestrategy.TMappingAttributeStrategy.GetForeignJoinColumnsFromMember
1d3e8a48 +1f0 aurelius260.bpl    Aurelius                  Mapping.Attributestrategy.TMappingAttributeStrategy.LoadColumnsFromMember
1d422be7 +0bf aurelius260.bpl    Aurelius                  Mapping.Explorer.TMappingExplorer.GetColumnsFromMember
1d42297d +175 aurelius260.bpl    Aurelius                  Mapping.Explorer.TMappingExplorer.GetColumns
1d42148c +038 aurelius260.bpl    Aurelius                  Mapping.Explorer.TMappingExplorer.FindColumnByPropertyName
1d4ace59 +249 aurelius260.bpl    Aurelius                  Bind.Dataset.TCustomAureliusDataset.AddFieldDefsFromClass
1d4ad54b +013 aurelius260.bpl    Aurelius                  Bind.Dataset.TCustomAureliusDataset.InitFieldDefsFromClass
1d4ad55a +006 aurelius260.bpl    Aurelius                  Bind.Dataset.TCustomAureliusDataset.InitializeFieldDefinitions
1d30f198 +064 aurelius260.bpl    Aurelius                  Bind.Basedataset.TBaseAureliusDataset.InternalInitFieldDefs
51411632 +006 dbrtl260.bpl       Data.DB        12647   +1 TDataSet.OpenCursor
514119ed +049 dbrtl260.bpl       Data.DB        12739   +5 TDataSet.InitFieldDefs
513fcb1b +02f dbrtl260.bpl       Data.DB         3765   +6 TDefCollection.UpdateDefs
513fd608 +014 dbrtl260.bpl       Data.DB         4125   +1 TFieldDefs.Update
1af0a855 +051 dclaurelius260.bpl Aurelius                  Design.Datasetdesigner.TfmFieldLoader.btOkClick
Any ideas why this would happen?


Strange, the error seems to be in RTTI framework itself. No idea about this... Is it possible to reproduce this issue in a small project?

I'll see if I get time today. But I'll need to do a work around for this first.

If I specifically use RegisterEntity in initialization then all works as expected.