I'm not sure this is factually correct. IIRC the prisoners were not denied contact with the Mexican consulate; they never requested it. In fact, I'm not sure that the nationality of the prisoners was established when they were arrested - that would be profiling, don't you know.
OTOH, the U.S. is signatory to a treaty that does require us to permit any alien to contact their consulate. It's in our best interests to hold to that treaty, as we want other countries to grant our citizens the same right in their countries. I'd like to know the facts here.
IIRC, We were supposed to tell them that they could contact the Mexican consulate, which did not happen.