I have Crohn's Disease. Up until a few years ago, I took Asacol for this. This is one of a whole class of drugs based on the active ingredient "mesalamine": Asacol is specialized in that it's got a coating that keeps it from dissolving until it gets to the colon. Somebody found that this coating (notice: not the drug itself, just an enteric coating) might be a risk for pregnant mothers - something that I will never be. So they stopped making Asacol, and came out with a new "Asacol HD", which is still good old-fashioned mesalamine, but with a slightly different enteric coating - and with a brand new patent.
Although I don't have any evidence to support the idea, it seems suspicious that this revelation about the coating being questionable during pregnancy, came to light not very long before the expiration of the patent on original Asacol.
So there exists a small group of patients (pregnant moms) who might have had trouble with original-packaging Asacol. Rather than putting these patients on other mesalamine meds (like Pentasa or Delzicol) for 9 months, that was parlayed into a need to discontinue the entire Asacol product and come out with a new one.
In this case, it seems that a desire (or a pretense) to make something safe for all sub-groups, even those that are small and easily segmented, becomes the engine for renewing the patent, and thus keeping generics out of the market.