XPackLicenseState is meant to be an opaque view of the current license level. The LicensedFeature class should be used to determine whether a feature is used, so that tracking is always. However, there are a few special methods on XPackLicenseState that currently avoid feature tracking. This issue is about one of those: isMachineLearningAllowedForOperationMode.
We should convert the one user of this method to using a proper LicensedFeature.