The Doctor cosplaying as The Doctor.
For those of you who don’t know, David Tennant (#10) married Georgia Moffett the daughter of Peter Davison (#5). Georgia played the cloned “daughter” of the Doctor in the episode “The Doctor’s Daughter.”
So the Doctor fathered the Doctor who married the Doctor. The Doctor is his own father-in-law, father, daughter, wife, husband, and son-in-law.
It’s all timey-wimey, wibbly-wobbly.