Q:

Why is MsiGetFeatureState() returning INSTALLSTATE_ADVERTISED for my un-advertisible feature?

I've got an MSI built in WiX defined as below:
<Feature Id="Core"
         Display="0"
         Absent="disallow"
         ConfigurableDirectory="INSTALLDIR"
         AllowAdvertise="no"
         Level="1">...</Feature>

I have a 'commit' custom action that loops through all the features of the MSI and determines their install-state. The log file shows this "Core" feature as installed 'Local', but MsiGetFeatureState returns INSTALLSTATE_ADVERTISED. I thought that was impossible given I set: 
AllowAdvertise="no"

FWIW, MsiGetFeatureState correctly returns INSTALLSTATE_LOCAL for all other installed features and INSTALLSTATE_ABSENT for all other not-installed features.
Edit for more info:

This occurs during a fresh install.
I do not set the ADVERTISE property (I still don't fully understand what it's for)
The "Core" feature is a parent feature with children that all have the wix attribute InstallDefault="followParent".
The "Core" feature (as well as its children) all have components attached to them.
All the child features are marked as INSTALLSTATE_ADVERTISED as well.
I have a commit custom action (scheduled before InstallFinalize) that queries the installed feature states ([ProductCode] is passed in via CustomActionData). I assumed that a commit action was the right choice since the MSI is officially installed by that point.

A:

Found out what the problem was (I think).
I had a custom action that would call MsiSetComponentState() to set a component to INSTALLSTATE_ABSENT if some condition was true. This means that my 'Core' feature was intended to have every attached component set to INSTALLSTATE_LOCAL, but since this one component was manually forced into INSTALLSTATE_ABSENT the 'Core' feature (once installed) is considered to have an install state of 'Advertised'. An additional consequence was that during uninstall all components attached to the 'Core' feature were getting left behind. Their action states were NULL (do nothing) instead of Absent (remove).
Moral of the story, don't use MsiSetComponentState() to turn off a component at install time.

