I would assume the fault lay with the class set up and work from there. It is a gifted class it should be challenging enough that she doesn't need the coping strategy of thinking about something else with half he mind. Unless it is an engrained habit.