A recent question on Finding Loops in GEDCOM files got me to wonder if there are some loops that are valid.
Of course there is science fiction, where a person goes back in time and parents their own ancestor. And there is the famous I'm My Own Grandpa song, but that is where he becomes his own grandfather through marriage, so he wouldn't be his own true ancestor and it wouldn't show up as a loop in a GEDCOM.
What I'm thinking of are adoptions. I can see a case where a person might legally adopt an invalid parent or grandparent so that they have caregiver rights or maybe there is some other valid legal reason for them to do so.
If that would be the case, then this would be a valid loop, where a child or grandchild is also the legal parent of their parent or grandparent.
Has this happened, or is this even legally allowed in any country in the world?
Are there any other non-science fiction ways in which a person can validly become their own ancestor and thus create a valid loop in a GEDCOM file?