Why this is not a defence of slavery

Acknowledging that slavery was lawful at the time, and that this creates problems for retrospective legal liability, is not a defence of slavery as a moral matter. The two questions are entirely separate.

Slavery was morally catastrophic whenever and wherever it occurred. That moral judgment does not depend on what the law said at the time. Moral philosophy can and does apply standards that transcend particular legal systems. But legal liability is different from moral judgment. Legal systems operate prospectively: they tell you what is and is not permitted going forward, and impose consequences for acts that violate the rules in force at the time they occur.

Separating moral condemnation from legal liability is not moral relativism. It is the recognition that legal systems depend on certainty and predictability, and that certainty and predictability require that liability be based on the law as it stood, not on moral judgments applied backward through time.