They are really picky regarding child visa in any case. Have you tried to call the immigration visa hotline? Ask them what is real law and why you are denied. If the child is yours according to court in Thailand I do not see the issue as well. You could take immigration to court or try to talk to a supervisor.
I got answer from Swedish Embassy now according to them the IM in Rayong and Pattaya have started to do this now. Sometimes they care sometimes they dont want it. I will close the the thread now.