Parameter default values are expected to be attached to all redeclarations of a template. During serialization they are serialized only for the first redeclaration (probably to save space, see OwnsDefaultArg in ASTDeclWriter::VisitNonTypeTemplateParmDecl in ASTWriterDecl.cpp).
During deserialization the default arguments are recovered for all redeclartions by static void inheritDefaultTemplateArguments(... in ASTReaderDecl.cpp. This function includes the following optimization: As the parameters that have default values have to be at the end of the parameter list, it inherits them from back to front, stopping at the first parameter without a default. This works fine as long as there are no parameter packs, which may follow parameters with defaults.
The fix in this patch simply checks for parameter packs and skips them, continuing the default value inheritance for the preceding parameters.