I agree that the lien should have discovered and addressed far earlier in the process, although it’s hard to say it should have happened before the home inspection. The exact amount of your damages is something I would either discuss with a small claims court judge or the Realtor’s broker. I doubt you are going to recoup anything for lost time/effort though, without suing in civil court and hoping they settle the suit to avoid trial. Hard to say exactly who is at fault: Realtor? title company? lender?