Perhaps I am risking the wrath of the righteous :) but to me the bottom line is that any form of sexual activity between any number of consenting adults of any gender should not have anything whatsoever to do with secular laws.
As to moral or religious guidelines or laws, each person should adhere to what is right according to their own beliefs and let others do the same.

When children come into the world, one would always wish it was into a loving, stable and secure environment. Sadly, this is not the case and millions of children every year are born in circumstances less than ideal.
Thinking about your original question...shouldn't any justice system try to alleviate any difficulty a child might face because of his/her origin and not make it worse? Therefore, any step made by the parents to confirm to the religious law, even after the fact, should be rewarded.