Simplify regression fix in previous commit by using msg.str() to
implicitly flush to the underlying std::string.