The functions captureslave() and _on_confirmwinning_pressed() in exploration.gd have different conditions for reputation loss. This results in a reputation loss if a you attacking and release peasants but not when you attack and capture peasants.
Indeed, it would appear that captureslave() has an incorrect condition. It was likely meant to avoid reputation penalties for capturing aggressors, but it fails to include those in the 'stranger' faction. If you replace the top condition with the bottom condition, then it should always penalize player for messing with those in the 'stranger' faction. Though it feels weird that capturing a person effects your reputation the same as just attacking them.
if defeated.names[defeated.units.find(person)] == 'Captured':
var index = defeated.units.find(person) if defeated.names[index] == 'Captured' || defeated.faction[index] == 'stranger':