From product update 1.0.23.0 you might receive this error when trying to terminate leases.
This is an update to product to split before used account into separate accounts for P&L.
This can be changed in Lease Categories page:
Old Account
Old account HAS to be cleared or you will continue to receive that error.
Same Account
If you do not have practice of splitting Gain or Loss on Termination - these accounts can be the same.