The order came in a peculiar context—a civil lawsuit over the custody of a child born in Afghanistan—but its logic extends further.