That rule says that when two nouns are joined by KAI, and the first is preceded by the article, they refer to the same person if:
1. both nouns are singular
2. both nouns are personal
3. both nouns are not proper names.
Since the nouns in Eph. 4:11 are not singular, pastors and teachers are not the same gift here.
See Dan Wallace - Intermediate Greek Grammar