Fix message on error stack to not have a newline. #3571