In this situation I would follow my inner spiritual guidance. It is there exactly for these kind of decisions. It is the mind beneath the mind. If I can be with It then decision is clear, as if there was no decision. I do not need to think. If I could be with this inner Knowing fully in this situation, then I will not just trust my eyes, or my mind, or even my knee-jerk cultural reaction which is to save the child. I will act immediately without thinking. The result can be anything: I may talk to the child, I may ask the child in, or I may even shoot it. But is it not really in my power to see beforehand why I make the decision I do. I may see it afterwards: perhaps the child was badly ill or wounded and death was the most merciful option. Or later, this same child I get in ti my home, will save my life in some future scenario. Probably this would happen because any child I would take in, I would begin to teach about this inner spiritual guidance, and they would learn to trust it and be saved by it, like I am learning to trust it.
So when I would see a child approaching my only thought is hopefully: What do I Know right now? And answer would be in the Knowing.
This is what spiritual preparation produces, a source to rely on when everything is unreliable. There is nothing in this world that is invulnerable, so you need to learn to make the connection to invulnerable to begin to strengthen yourself spiritually. It takes a long time, and it is work.
As a note to the moral discussion of things. I think children are the future. What is the point of surviving if there is no room for children in survival? And to those who worry that a child is troublesome. Mentally or physically ill child can be troublesome yes. But a child that is healthy learns quickly, and if you as an adult can keep clear and calm mind, the child is affected by this and calms down. If a child affects you more mentally than you affect them, then your mind is too weak for survival anyway, imho. Anybody with kids has a training ground (well, some might call it bootcamp) available to strenghten their mind and develop this still, aware and calm state. Your child learns what you teach. If you teach confusion or fantasies, they will be confused and live in fantasies. If you teach calmness and clarity, they will be calm and clear, and of course a great joy to you.