Mail Rule perform following actions reversing
I have a simple rule in Mail:
1) On receipt of new eMail, run Applescript detaching attachments to local folder
2) Move Message to mailbox: Trash
When I click OK (which closes that dialog) and then re-open the rule, the event order in Perform Actions has reversed to have Move Message to Trash as first. The rule does this, of course, but then the Applescript is not run (presumably because the Message is now in the Trash). If I remove the Move-to-Trash action, the Applescript runs just fine. The reason I need the Message in the trash is because with the next incoming eMail, the rule is run on all already-received eMails, doubling up the detachments. Putting the Message in the trash means it is removed from be acted on a second time.
Has anyone seen this Mail actions reversal of order, or does anyone have a fix? Any ideas much appreciated.
macOS Sonoma, but observed this behaviour on Ventura as well.