Fixed namespace parsing of template declarations.