Yeah, I understand why you said it, but it is hilarious. Some hispanics might get offended by things like that, though. If you call a Puerto Rican a Mexican, he might think that you care so little about the differences among hispanics that you just throw one big don't give a shit label on all of them. I don't think you were doing that, but it could be perceived that way.
This conversation reminds me of an incident I watched at a Chinese restaurant last year. An Asian couple was eating there, and some guy with a country accent asked them what a certain Chinese word meant. He assumed that any Asian in a Chinese restaurant would be Chinese. The people he asked might have heard nothing but, "All Asians are the same." I just thought it meant he didn't think long enough for it to dawn on him that Koreans and Japanese might like Chinese food too. (Or Americans of Korean or Japanese (etc.) ancestry. I might need to put myself on Archie Bunker alert.)