I believe the residency requirement is one year AFTER age of 18 in the example and law you presented.
If she was 17 for part of that year, it would not count.
I can think of a reason for the one-year requirement: to keep from spawning generations of US citizens with no connection to the US. However, I can think of no rational reason to exclude children of minors.