Fix for multiple triggers toggling different classes on single targets

This fix relates to 91b8aa7.