At that time the Indian nations were by treaty foreign nations so they were foreigners as were their children so it is on point.
Except that neither opinion in these cases conflates Indians with immigrants in the way you're trying.
The Elk opinion and the WKA opinion were authored by the same Justice -- Horace Gray. I think that Justice Gray understood better than you why these opinions aren't conflicting.