We use account linking in a rule and change the primary user.
The docs says you need to set
context.primaryUser to the id the user got linked into.
But, when doing just that the next rule still uses the previous user (which by now is non-existent, because it was linked into another user).
After trial and error it seems you also need to call the rule callback with the other user, i.e. the user the original user got linked into.
Please revisit this.