The president suffered the awkward moment during his final meeting with leaders from India, Australia and Japan.