It is possible that the thread we are running a function on could exit while we are waiting for the function call to return.
We sort of handled that case before, but it really only worked by accident because the ThreadPlan still had a pointer to the Thread, and it hadn't actually gone away when we touched it after stopping and finding that it had exited. Now that ThreadPlans re-look up the thread after each stop, we were handing out a null Thread pointer and crashing.
I moved the checking for vanished threads to the helper routine that handles the stop event, added an expression result of eExpressionThreadVanished and handle it properly in RunThreadPlan. I also added a test using a function that just called pthread_exit. This crashed before these changes, and works correctly after.