Fix handling of completion events after terminate_job_object