What on earth is the felony charge?
I would simply fight the felony charge and threaten a lawsuit challenging the policy on "look-alike" drugs. I would follow through on the lawsuit if the district refused to back down.
One day, when the kid is 19, he'll be shaping up for the re-instituted draft, and he'll be rejected due to his criminal record. When the other rejects ask him his crime, he'll have to tell them, "carrying sugar in a plastic bag". And they'll all be very afraid.