Shave and a haircut....two bits

I was told by a Spanish teacher in High School that if one were to knock the cadence to “Shave and a Haircut” in Mexico, it was considered a grave insult. For those of you who don’t know the cadence I’m refering to, it’s the typical cheesey knock that people use when trying to be cute.

It’s a bit like this: -…-.–.-…-…- with the - representing a knock and the . representing a pause.

Any truth to this at all?

Sorry if this has been answered before, but the search function is just dragging for me now.

A compilation of threadds cab be found here. It seems to be one of the few questions not to have a definitive answer.