I hate when people I don't know well touch me. I always have.
So I'm with your daughter. While I don't think Gary had ill intentions, I think your daughter handled herself with grace and good manners. As for it making him uncomfortable that his joke fell flat - well, I think it will do him well to learn that not all children appreciate those sorts of jokes.
If he backs off and quits trying those sorts of jokes with your daughter, I'd say to let it go. If he persists despite her telling him that she doesn't find them funny, then you should step in. At this point, though, I don't see anything evil or creepy in his actions.