I have a question on 529 and using Education tax credits.

Situation:
Independent son, Half-Time Student. We use his 529 (1099-Q) to pay $1,200 in Tuition (1098-T) and books. The 529 had around $200 in gains. Is it possible for us to use Amer Opp Credit as well? Lot's of people said NO. No double dipping. Running numbers in Turbo tax (1099Q) seems to allow it but you pay taxes on the $200 in 529 gains. What is right way to do this properly?