It could be set up as "this ship benefits from the Carrier Group skill, but doesn't count towards the cap".
On a related note, does the Carrier Group skill count built in fighter bays? I assume it is just fighter bays on ships tagged as carriers, so that ships that happen to have their own fighter screen but aren't really carriers don't count, but I also wouldn't want Shepherds counting against my carrier cap if I am just using them as defensive escorts (although if I wasn't at the cap, I might want them to count, hmmm...)