I have an automation rule in place which moves statuses of blocked issues, depending on the status of the issues that block them.
When any issue is transitioned, the rule checks to see if it has any other issues that it's blocking. If the original issue is blocking other issues, and it's moved to a non-resolved status, then the rule transitions all issues that are blocked to the "on hold" status.
If the original issue is blocking other issues, and it's moved to a resolved status, the rule checks for issues that were blocked by the original, and that now are only blocked by other issues that are in a resolved status. If both of these things are true, the blocked issue(s) are then transitioned into the "ready for dev" status.
This works well, and all involved are happy. Screenshot below.

The dev team has run into a case where a blocking issue is deleted instead of transitioned. They're asking for a rule to address this. I'm cobbling it together from the above rule that does work, but I'm hitting an error.
The Rule:

The Error
The following issues did not match the condition:
JQL search failed for some issues. This is most likely because the JQL with smart-values was not valid for this query:
"(issue in linkedIssues("PGESDBX-21","blocks")) AND (project in (10173))" - Issue 'PGESDBX-21' could not be found in function 'linkedIssues'.
The newly-unblocked issue isn't being placed back into the "ready for dev" status, and I'm getting the above error that to my eye seems to be saying that it can't evaluate for issues related to the original because the original was deleted.
Putting aside the widely-held view that issues shouldn't actually ever be deleted, is there something I'm missing that would make this work?