i.e., they must have been residents or citizens at some time during the tax year. The children in this case, Carlebach v. Commissioner (7/19/12), qualified for citizenship because of their mother's US citizenship, but in that situation they did not actually become citizens until they actually came to the U.S., under 8 US Code Sec. 1433.
Children claiming citizenship under other statutes may not be subject to this rule. I did not see whether diplomats, children, for example, come under it, but I very much doubt that they would.