You’ve just excused slave ownership because it was “the law” at one time.
If a law is immoral or unethical, then you run into a moral or ethical issue, but this law was simply a way to calculate taxation on real estate sold under certain conditions. There is nothing immoral or unethical about that.