It sounds like Gary tried to overcompensate for the failed joke and then went and did it again. I think you and your daughter were just fine. "Humoring" someone is also a balancing act. Some people just don't recognize social cues like facial expression or a laugh that isn't boisterous, which would trigger someone to stop a certain behavior. Humoring someone could be an invitation for that action to continue. Sometimes you do, sometimes you don't. You are allowing your daughter to place her own boundaries and work with what's comfortable for her and say so. If she was rude, you could jump in and apologize to the individual and correct your daughter's behavior, but in this case, again, I think you and your daughter were just fine.