T hey were distressed because they were confident. They came there, and were confounded.
Ficam envergonhados por terem confiado; e, chegando ali, se confundem.