I've had this problem for a while. It might correlate to the KM9 upgrade.
Some macros fire outside their application availability. IOW, a macro in a group whose availability is limited to the application TeachText will trigger in another application.
Needless to say, this causes some real havoc and has the potential to destroy work, depending on the misfiring macro. When I figure out which macro is firing, I can go to the parent group, delete the restriction and then add it again, and that will fix it.
Is this pilot error, or some kind of a bug? Are there best practices to avoid this?