Tobacco case costs ruling could thwart legal aid plans