Better hasing of exceptions when a stacktrace is present