Stacktraces: fix duplicated lines in stacktrace for multiline error messages