Here the route is direct. The nerve followed the same route through the higher vertebrates but as the neck became longer the detour came to look increasingly absurd. If these examples don't work for you, perhaps others would. Certain cetaceans produce teeth during development which are then reabsorbed before birth. I find it hard to find a function for the teeth since the foetus gets its its nourishment via the placenta.
Chickens have genes for teeth.
It isn't easy to see a function for a gene which is never expressed. I haven't checked out the panda example. If anyone could provide references I would be grateful. Gould is a popular writer - no discredit to him intended. I'm looking for literature from morphologists.