I don't know about a matter of legal doctrine, but it doesn't seem right to punish the child for the sins of the parent. The kid didn't do anything wrong or immoral.
Catholic teaching is that parents are primary educators of their kids. In an above post I mentioned that the church normally doesn't baptize kids if the parents don't agree to raise the child in the church.
It's the same situation here. When you are flaunting your disregard for a teaching of the church, how can you then agree that you will abide by its teachings when teaching your child?