The president tried to take a victory lap as he wrapped up the summit. Instead, he made his own insecurities — and his own confusion — very obvious, writes Holly Baxter