I do not expect my dog to be OK with being physically hurt (pulling tails, poking eyes, jumping on the dogs back) or teased by a child or anyone. At the end of the day regardless of how well behaved he is around children he's still an animal and to a degree unpredictable. We do not have small children in the house but have guests that come over with their kids, the neighbors kids ask to come play ball with him in our yard sometimes and he's great, but I supervise, always. I have before said, no don't pull on him like that, etc. I give direction & stop behavior that I don't like to see. I hate to see some kids around animals.
My husbands buddy was over with his son who has a toddler. Rusty was laying on the floor and the little boy tripped and fell right on Rusty. Rusty yelped, jumped up and started circling the little boy licking him. I was pleased with his response. Sometimes if we have guests over with a lot of little ones running around I crate Rusty.