You are correct to point to it.
The Buenos-Aires adventure was an Army-Navy scheme, invented locally, by Popham (egged on by British mechantile interests) who got Baird to agreed in getting some loot.
Things seems fine, then the Spanish did something. Even reinforcing the unauthorized effort (at the cost of neglecting a common cause with Alexander and Frederick William in Poland) did not help nor did Beresford's nor Whitelocke's efforts.
Nice little surrender though.
Guess such mad dashes are Gilbert's source for the line "Well, here's another nice mess you've gotten me into!"
Perhaps, someone else used it before (certainly some OT folks - O&H - used it in the 20th century).
In any event, it was certainly apt. - R