Be more specific in checking if a job restarted successfully.

Fixes: #9056