Better error message for non-existent generics groups.

Closes PR13671.