For me its easy. The child was not a resident of the US which is expressly required by the last part of the sentence in the constitution.
Exactly. Simply being born on US soil did not originally mean automatic citizenship if the parents came from a foreign country and were not residents. That is what Indian tribes are considered and what the Elk decision confirmed.
Congress properly remedied that for American Indians in 1924 which is their right under the jurisdiction clause to do.
Illegal aliens are claiming they are residents and are paying taxes, therefore they qualify. But that is a stretch since at best it's only sales tax they pay, and quite a few of them are coming across the border solely for the purpose of giving birth.
Granting automatic citizenship in those cases is a violation of the spirit of the 14th Amendment and not how it was intended to be applied.