Even though he came here illegally, he still receives the same rights and protections under the treaties we agree to with Mexico by virtue of his birthright.
Much like an American smuggler would still be afforded the protection iof his citizenship.
Ever notice that there are not many cases of American Smugglers being tried in Mexico? Americans turn up dead if the ransom is not paid. Our laws are not a suicide pact. I have traveled internationally. We were told to obey all of the local laws. Consular contact is primarily so that they will know where to send your remains and personal effects.