Fix std::getopt::opts_str

Fix std::getopt::opts_str

Closes #6492 (std::getopt::opts_str fails for arguments other than the first one).