This may have been a mistake by Ricardo, but not one that points towards less trade as optimal. Indeed, export-led development (implying more trade openness) is the one reliable way we know about of going from the "coffee beans" to the "microchips" stage of development.