Even this behaviour can evolve:
From New Scientist
AS IT floats through the air, a spore of the fungus Ophiocordyceps camponoti-balzani seems benign. But when it encounters an ant its true nature is revealed. First, it punches its way through the insect's exoskeleton. Once inside, it begins to grow, consuming just enough of its host's tissues to leave it weakened but functional. Finally, when the fungus reaches sexual maturity, it releases chemicals into the ant's brain. Under their influence, the hapless insect makes its way to a popular ant meeting place, climbs a plant and clamps its jaws onto the underside of a leaf, just as the parasite consumes its brain. Days later, elaborate fungal reproductive structures shoot out of the insect's corpse, spores rain down onto the unsuspecting ants on the forest floor, and the cycle begins again.
The method used by the parasitic barnacle Sacculina to perpetuate itself is even more fiendish. Its free-swimming larvae infect crabs and, once inside, develop into a structure on the animal's abdomen that resembles a regular egg sac. If the infected crab is female, the presence of the false egg sac and the fact that the parasite releases hormones mimicking the ones that make her broody cause her to care for the barnacle as if it were her own offspring. Manipulation of males is more cunning still. Hormones released by the parasite change both his morphology and behaviour: the abdomen becomes wider and flatter, resembling a female's, and he becomes sterile and develops egg-caring behaviours to nurture the barnacle.