A brain parasite infects the very cells meant to stop it. Scientists now know how the body still manages to fight back.