Sec. 349. (a) From and after the effective date of this Act a person who is a national of the United States whether by birth or naturalization, shall lose his nationality by--
(1) obtaining naturalization in a foreign state upon his own application, upon an application filed in his behalf by a parent, guardian, or duly authorized agent, or through the naturalization of a parent having legal custody of such person
Sec. 349. (a) From and after the effective date of this Act a person who is a national of the United States whether by birth or naturalization, shall lose his nationality by--
(1) obtaining naturalization in a foreign state upon his own application, upon an application filed in his behalf by a parent, guardian, or duly authorized agent, or through the naturalization of a parent having legal custody of such person; Provided, That nationality shall not be lost by any person under this section as the result of the naturalization of a parent or parents while such person is under the age of twenty-one years or as the result if a naturalization obtained on behalf of a person under the age of twenty-one years of age by a parent, guardian, or duly authorized agent, unless such person shall fail to enter the United States to establish a permanent residence prior to his twenty-fifth birthday
bookmark
MM:”Provided, That nationality shall not be lost by any person under this section as the result of the naturalization of a parent or parents while such person is under the age of twenty-one years or as the result if a naturalization obtained on behalf of a person under the age of twenty-one years of age by a parent, guardian, or duly authorized agent, unless such person shall fail to enter the United States to establish a permanent residence prior to his twenty-fifth birthday.”
I am not so sure that this distinctly covers the case when someone is adopted by a native of the foreign country. The first part obviously does not apply (”result of the naturalization of a parent or parents”) because his adopted father - assuming he was adopted - was not naturalized. And the second condition is questionable as to whether it applies either (”result if a naturalization obtained on behalf of a person...by a parent, guardian, or duly authorized agent”). If BHO was adopted, there was no naturization applied for. He became a citizen by parentage. At least that is how I believe the US would handle an adoption of a foreign child and I assume this is the case for Indonesia as well.
I think the statute that you quote only applies to children of parents/guardians that become naturalized in a foreign country (are not native born) and desire their offspring to take on citizenship along with themselves.