Those laws were passed before DNA testing. It seems like they could be updated for that.
I think a better solution is taxpayers shouldering the burden than punishing an innocent individual (actually a victim).
One man had won a court settlement when he was young and the woman applying for benefits remembered reading about him in the paper, so she put his name and address on the application to get the money. The court ordered him to start paying child support. He tried to fight it in court with a DNA test, but you need to serve the mother and neither the court nor the social welfare agency would release her address.
Example: the father may take drugs to relieve the pain. Said father may invite the child to join him, setting up the child for life.