Legislation that would eliminate the need for a doctor’s certification for certain veterans to be allowed to buy medical marijuana ran into unexpected opposition on Tuesday.