the original text containing the invisible hand can be found here:
An Inquiry into the Nature and Causes of the Wealth of Nations
Book IV, Chapter II
Of Restraints upon the Importation from Foreign Countries of such Goods as can be Produced at Home
this is the original text:
But the annual revenue of every society is always precisely equal to the exchangeable value of the whole annual produce of its industry, or rather is precisely the same thing with that exchangeable value. As every individual, therefore, endeavours as much as he can both to employ his capital in the support of domestic industry, and so to direct that industry that its produce may be of the greatest value; every individual necessarily labours to render the annual revenue of the society as great as he can. He generally, indeed, neither intends to promote the public interest, nor knows how much he is promoting it. By preferring the support of domestic to that of foreign industry, he intends only his own security; and by directing that industry in such a manner as its produce may be of the greatest value, he intends only his own gain, and he is in this, as in many other cases, led by an invisible hand to promote an end which was no part of his intention. Nor is it always the worse for the society that it was no part of it. By pursuing his own interest he frequently promotes that of the society more effectually than when he really intends to promote it. I have never known much good done by those who affected to trade for the public good. It is an affectation, indeed, not very common among merchants, and very few words need be employed in dissuading them from it.
the flaw in the argument is as follows:
first of all note the context in which smith introduces his invisible hand: Of Restraints upon the Importation from Foreign Countries of such Goods as can be Produced at Home. so the concept of invisible hand arises in the context of what is nowadays called outsourcing.
smith states: every individual necessarily labours to render the annual revenue of the society as great as he can.
here smith implicitely assumes all individuals adhering to the blanc aforism: individual labour maximises the revenue for society, not for the individual himself. the point is that smith assumes the society to work internally according to the blanc aforism whereas the society externally (in this context meaning in international trade) interacts according to the market principle (i do the least and i take the most). the flaw in his argument is that he then assumes (or seems to assume) that the external and internal working coincide.
by the way, towards the end of this section smith states: I have never known much good done by those who affected to trade for the public good.
so according to smith B-corporations are not viable.