I don't have any kids so I can afford to act the fool, but I would think the primary mission of a parent would be to remove the child from the situation.
If the situation permits. I wasn't there so I don't know. Apparently that is what the OP did in this case and I believe he did the right thing. Depending on how blatant or inappropriate someone acts...Its hypothetical. The original post made it sound like it warranted some sort of reaction. But you are right, removing the child was the best thing he could have done. I can't say what I would have done, but if it were as bad as he made it sound I feel pretty sure would have called him on it.