[PATCH] fix/simplify mutex debugging code