fix #768 - don't add macro if state needs to group commands