Hmm.. this may help on finding the error. It seems to happen whenever you have disabled squads: it is taking ( disabled + available ) squads and then divides by 2. Examples:
Unit 5008: (5) x 7... (5+7)/2=6... shows Aviation Support 6 (incorrect)
Unit 5007: (0) x 18... shows Aviation Support 18 (correct)
Unit 6289: (6) x 10.. (6+10)/2=8.. shows Aviation Support 8 (incorrect)
It calculates the tooltip correctly when there are no disabled squads, and incorrectly when there are disabled squads.