fix a mutex bug  in the death code path

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>