When the FglAMs were set up in HA mode they were installed in different state folders instead of having one FglAM installation for each FglAM HA member.
Setup:
Having two HA setups (HA 1 + HA 2) on two machine (node 1 and node 2).
The primary FglAM of HA 1 is running on node 1 while the secondary FglAM of HA 1 is running on node 2.
The primary FglAM of HA 2 is running on node 2 while the secondary FglAM of HA 2 is running on node 1.
On each node there is one FglAM software installation and the FglAM HA members are installed in different states of the software installation. That means the primary FglAM of HA 1 and the secondary of HA 2 are sharing the same software installation (and vice versa).
The agent package deployments are always valid for the whole software installation, so if on HA 1 an agent package will be removed, it will affected the secondary member of HA 2. Or if one agent package will be deployed on HA 1 it will be deployed for the secondary of HA 2 too.
So if HA 1 and HA 2 do not host the same agent types, the secondary members will be messed up due to the shared software installation.