Vegan, you were penalized needlessly. There is no penalty for touching the grass in a hazard as long as nothing was done to test the surface and you did not ground your club. The restriction is for touching the ground, water (in a water hazard), or any loose impediment in a hazard (a bunker is hazard). There is no prohibition for touching grass growing in a hazard, as long as it doesn't improve your lie or the area of your intended swing, it doesn't constitute testing the condition of the hazard (i.e touching the ground), and it doesn't meet the definition of "grounding", (the club's weight resting on the grass).