My dogs have never nipped anyone. Frankly, if I knew my dog were "funny" the last thing I would do would be to have a strange child petting it. If you can't trust your animal (which if you felt the need to hold it so closely you don't) then you shouldn't let strangers touch them, or keep your attention focused on what's going on. That's just my two cents. Animals can be unpredictable, animals natural instincts don't always match up with the behavior we define as acceptable or unacceptable. It is your responsibility to have control of them and the situations they are in. Thank god the little girl wasn't hurt worse. I know it was an accident, but you're lucky. Especially with how sue happy people are these days.
I keep an eye on my dogs with other kids just to make sure they don't get rough. Especially when my big guy was young, you could wrestle with this dog, throw him around, etc. I didn't want him to mow a random kid down lol, so made sure things never escalated to that level of rambunctiousness. My kids (and us) will play with him because we know he loves it, and it's fun, a child who isn't around him constantly may not know he's just playing, and I don't want him to frighten someone or knock a kid down and have the chance of them getting hurt. I have a cat I keep shut up when kids around, if you pick him up he goes spastic, and I don't want someone to pick him up and then deal with that writhing terror. He loooves being patted and leans up against your legs like he wants to be picked up, but it's an illusion. The horses I am extremely careful with. I trust all of them to not kick, not bite, etc. But, horses are huge. If a bug lands on them and they stomp their leg to get rid of it, a child could be knocked down or stepped on. If a kid panics and bolts when they get near the horse (it happens), I have one that will chase you. Not maliciously, but a "Yay! Let's play and run around!". If you're scared and run, and then the horse is chasing after you....it's probably not a good experience haha. There's always the chance something randomly scares them and they jump or bolt and you get knocked over. Their heads are massive, and they'll butt you with it so you scratch them, give them a treat, etc. It has the chance to be dangerous, so kids are not allowed near them without very, very close supervision.