It happened to me once. While visiting the Institute for Advanced Studies at the Hebrew University of Jerusalem in 1976-77 I answered a question from the preliminary manuscript of volume 1 of Lindenstrauss-Tzafriri by constructing Banach spaces not isomorphic to Hilbert spaces all of whose subspaces have the approximation property. They replaced the question with one of my examples in the published book. I delayed writing the paper, which appeared several years later (1980). Actually I wrote the paper only because L-T had included the simplest rather than the most interesting example (which had the property that every subspace of every quotient has a Schauder basis).