For more than a decade generic drug makers and big-name pharmaceutical companies have been winning court rulings that allowed them to legally pay a competitor to keep its product off the market for years. Until this month.