Rewritten get_this_generic to avoid duplication of the function and have faster access to the generic attribute.