From what I've read, licensed teachers are about as smart as the average 4-year college graduate. It is therefore inevitable that many gifted students will have math teachers with lower ability than them. The worst case would be a teacher who is weak in math and determined to show that she knows better than all of her students. The OP's teacher does not sound like this.