If u understand it's a dog then yes, they are VERY predictable. All terrier breeds have what's called a prey drive, this is thanks to us... when u look at a dog as a pet u look at the purpose for which we breed em (all dogs were breed for purpose) for example a terrier was breed for catching vermon on a farm..ie it sees something smaller than it, it's gonna catch n kill it impulsively now lucky for us since we know this trate we can train the dog to react how we want it to.for example I had a terrier growing up n also had cats if we didn't introduce em knowing the breed purpose of the dog shit could of ended badly...all about education bud.
I don't know about the dogs history but I'll highlight a few points. For one you should NEVER LEAVE A CHILD UNATTENDED WITH ANY FUCKING DOG THAT HASHT BEEN BROUGHT UP AROUND SAID CHILD N EVEN AT THAT THE CHILD SHOULD BE OLD ENOUGH TO UNDERSTAND HOW TO ACT AROUND N TREAT a DOG!!!
a dog doesn't see a child it sees a possible predator!!! Ie so no high pitch sounds no pulling or anything like that. Secondly if you're around a strange dog (even family's dogs) you shouldn't approach them in the first place, the dog should always approach you n even then never look the dogs in the eyes n let him smell ur hand to start with. When rubbing a dog never run the top of his head, that's asserting your dominance (big nono if it's not ur dog). OK so let's recap a small child at a very loud party (insanely stressful for a dog) runs into his packs den, more than likely looks him in the eyes (dog was probably giving signs it was uneasy but the child didn't understand (poor parenting)) then approaches him n with the hand reaching from up (where the child was positioned) down to the dog (very dominant) the dog reacted as you'd expect a frighten animal to react. N if the dog was as old as you say it may have had underlined health problems which is very common in older dogs ie arteritis n cancer