Former slaves that had a placeholder parent get PC assigned as the parent

Current Behavior

With "missing slave names" on, if a slave had parents with a non-0 ID (for example household liquidator slaves) and gets sold along with anyone else having connection to that parent, the PC becomes their parent. Or at least that's what I think is happening, took me a while to reproduce it.

Steps to Reproduce

  • Start new game with "missing slave names" on, cheat money and reputation.
  • Get incubator, buy two siblings from the household liquidator.
  • Have a child with one of the two siblings; now the family tree is correct (they have two common parents, and you're the father of the child).
  • Sell both siblings; now you're the father of both the child and the sibling who gave birth to said child.

Additional information

FC version: 0.10.7.1, mod version: 4.0.0-alpha.19, build: 1179; should be the last one or close to it. Attached both a save file before selling the parents and one after selling the parents. I attached the one I reproduced the bug into instead of my main save so it's less full of slaves that don't have anything to do with it. I need to say that I think it's only a visual bug, because in my main save I haven't noticed any unexpected inbreeding Col values appearing, which I'd expect if the game really thought I was both the parent and grandparent. Wouldn't bet on it though.

before_sell.save after_sell.save

Edited by Keyren23