Move local struct to namespace level. Refs #7199

Some older compilers can't deal with a function call where the template
type is only defined locally within the function.