Your fix is good and safe Task finish event came from blueprint’s latent action (delay/timer/something similar) and should be ignored when task node is no longer present in active tree.
I’ll add aborting all pending blueprint execution when tree is stopped + your failsafe to engine’s code.