The FBI director managed to embarrass himself and his agency on a world stage.