If a custom action is scheduled before the "FindRelatedProducts" action, the "First time install" and "Upgrade" options under "Dialogs/Execution Stage Condition" should not be available. Before "FindRelatedProducts" is executed, the OLDPRODUCTS property is not set, so it is not yet known whether this is a first time install or an upgrade. If only one of those options is selected, the custom action will not run as expected, or may run unexpectedly during an upgrade. This bit me a couple times.
This seems to be an Advanced Installer issue. A fix will be available in a future version of Advanced Installer, thank you for bringing it to our attention.