Section 17. If a marriage is declared void by reason of a prior marriage of either party and the court finds that the second marriage was contracted with the full belief of the party who was capable of contracting the second marriage that the former husband or wife was dead, or that the former marriage was void, or that a divorce had been adjudged leaving the party to the former marriage free to marry again, or that there was no former marriage, such finding shall be stated in the judgment, and the issue of the second marriage, if born or begotten before the second marriage was declared void, shall be the legitimate issue of the parent capable of contracting the marriage.