Weekend reading took me to this fascinating 1989 paper, Diet-Induced Developmental Polymorphism in a Caterpillar, by a University of Montana biologist, Erick Greene:

Caterpillars of the spring brood of Nemoria arizonaria develop into mimics of the oak catkins upon which they feed. Caterpillars from the summer brood emerge after the catkins have fallen and they develop instead into mimics of oak twigs. This developmental polymorphism may be triggered by the concentration of defensive secondary compounds in the larval diet: all caterpillars raised on catkins, which are low in tannin, developed into catkin morphs; those raised on leaves, which are high in tannin, developed into twig morphs; most raised on artificial diets of catkins with elevated tannin concentrations developed into twig morphs.
How do I explain this? It's so bizarre. This kind of caterpillar mimics what it eats in stages. The season changes, the oak changes, and the caterpillar changes into what it eats on the changed oak tree—a flower, a twig. Meaning, it not only looks like what it eats, but if what it eats changes, it changes with it. Weird and wonderful.