Issue #16445: Fix potential segmentation fault when deleting an exception message.