Refactor all the checking for missing 'template<>'s when a declaration has a
template-id after its scope specifier into a single place.