Possible bug in creation of attitude provider from AEM when REF_FRAME_A and REF_FRAME_B are inverted

Dear all,

While doing some tests on creating an attitude provider from an AEM file using Orekit 12.1.3, I have noticed a strange behavior when inverting the REF_FRAME_A and REF_FRAME_B fields in the AEM file.
E.g. if in the original file REF_FRAME_A = EME2000 and REF_FRAME_B = SC_BODY_1, the new file now has REF_FRAME_A = SC_BODY_1 and REF_FRAME_B = EME2000, but no other changes (i.e. the attitude data records are not changed).

When this inversion of frames is done, and an AggregateBoundedAttitudeProvider is retrieved from the Aem object, the BoundedAttitudeProvider in the AggregateBoundedAttitudeProvider (only one in my case, as I have only one AEM segment) seems to have in its tabledata field a list of TimeStampedAngularCoordinates that represent the inverse rotation with respect to the AEM records.
I.e. the rotation field in each TimeStampedAngularCoordinates object has quaternion scalar part with opposite sign with respect to the AEM records, but vectorial part with the same sign.
As per how the provider is defined, however, it represents the rotation from SC_BODY_1 to EME2000 (as specified in the AEM).

This is unexpected to me. I would expect the rotation field in each TimeStampedAngularCoordinates to have quaternions identical to the AEM attitude data records, representing a rotation from SC_BODY_1 to EME2000. Inversion would then only be done once retrieving the rotation from EME2000 to SC_BODY_1 from the provider.

This behavior does not happen in the original AEM, which has REF_FRAME_A = EME2000 and REF_FRAME_B = SC_BODY_1. In that case, the rotation field in each TimeStampedAngularCoordinates has quaternions identical to the AEM records, and represents a rotation from EME2000 to SC_BODY.

As reference, given an Aem object named aem, this is how I am retrieving the attitude provider:

aem.getSatellites().values().iterator().next().getAttitudeProvider();

I think this may be a bug, but please let me know if I am losing something here, and if you need more data from my side for the investigation.

Best regards,
Gaulz