For those thinking that I'm my own grandpa is illegal or wrong for some reason. It is perfectly legal and could happen.
The man was 23 and probably married a widow some years older than himself. Then his widowed father fell in love with the widow's daughter (his stepdaughter). There was probably, again an age difference, but it was true love. And being widowed and not at all related through blood to his true love they married. Nothing wrong, nothing gross, nothing illegal at least where I live. True love in both cases.
The song is a mind bender, but to really figure it out you've got to put it down on paper.