RimWorld 1.2.2900 Linux, no mods or royalty.
Prisoners that are caravanned and gifted back to their own faction incur "Prisoner sold" moodlets and "Sold prisoner to slavery" social opinion penalty.
There is a mechanic in place that gives you more goodwill for gifting a faction their own people back. This should not count as selling slaves.
Spawn a raid from fierce tribe / savage outlanders, down, capture, heal, form caravan to their faction, gift prisoners, observe penalties. Or try the test save. Note that Barracuda is not of the same tribe, and selling her should give a mood and opinion penalty.
Tribe: Thank you so much for bringing our boys back! We won't attack you anymore! Would you like to trade?
Colonists: Maaaan that sucked, we really should have cut off their legs and let them hobble back home on peglegs instead.
That issue is already known, thanks: https://ludeon.com/forums/index.php?topic=52296
Argh ya got me! Forgot to search for previous reports. Well, at least it's a reminder.
Locking topic, known issue.