What, Pray Tell, Is A "Foreign Corporation"?

Earlier this week, I wrote about Wellisch v. Pa. Higher Educ. Assistance Agency, 2017 U.S. Dist. LEXIS 40831 (N.D. Cal. Mar. 21, 2017).  The issue was whether the defendant, Pennsylvania Higher Education Assistance Agency, was required to register as a foreign corporation in the State of California.  The case turned on whether the defendant was transacting intrastate business.  The plaintiff pointed to the fact that the defendant had previously registered as a foreign corporation.  The defendant countered that it had allowed its registration to lapse because it no longer had any employees in California and no longer conducted business from California.

This all assumes, of course, that defendant was a "foreign corporation" as California shuts the courthouse door to foreign corporations.  Cal. Corp. Code § 2203(c).  The defendant argued that it was a governmental agency of the Commonwealth of Pennsylvania and was therefore not subject to registration as a foreign corporation.  Judge Freeman declined to address this contention in her ruling in light of her determination that the defendant had ceased transacting intrastate business.

The California Corporations Code defines a "foreign corporation" as follows:

[A]ny corporation other than a domestic corporation and, when used in Section 191, Section 201, Section 2203, Section 2258 and Section 2259 and Chapter 21, includes a foreign association, unless otherwise stated. “Foreign corporation” as used in Chapter 21 does not include a corporation or association chartered under the laws of the United States.

Cal. Corp. Code § 171.  Read literally, this definition is hopelessly confused because "corporation" is defined as a corporation organized under the California General Corporation Law (and specified domestic corporations).  Cal. Corp. Code § 162.  Thus, a corporation organized in Delaware is not a "corporation" as defined and thus could not be a "foreign corporation" as defined.  Obviously, the legislature must have intended to use "corporation" in Section 171 in its generic sense.  That, of course, doesn't answer the question of what is a "foreign corporation".  For example, is a Société anonyme (S.A.) or Gesellschaft mit Beschränkter Haftung (GmBH) a foreign corporation?