I've run into this several times. Generally, it's caused by one or more instanced being deleted from a family table then, later, the assembly that used the now-deleted instance is used in a higher level assembly that uses a newer instance (thus a newer generic) of that component.
You'll have to fix the family table.
Figure out which instance is missing then follow CS4975.
Best practice to avoid this situation is to never delete family table instances. If there is an absolute need to get an instance out of a table (which should be a rare occurrence) , make it a stand-alone part instead of deleting it, which must happen before iterating the family table.