Prevent duplicate logging of top-level exceptions.