Can a deal go ahead even if there is a defect in the legal title?
Yes, the buyer is always free to accept the risk of a title defect, but should first consult with a lawyer to make sure the risk is minimal. There often are ways to reduce the risk to manageable proportions. For example, the title insurance may be willing to insure over the risk if appropriate affidavits are signed or if money is placed in escrow to cover the risk. In some cases, the seller may be willing to put money in escrow so there are funds on hand to pay off a construction lien if the lien holder goes to court during the statutory period and wins.
Or if there is a boundary line dispute, you as the buyer may decide to buy the property anyway if only a small piece of the property is involved in the dispute. Your reasoning may be that even if you lose the disputed area, the remaining land that you are buying is well worth what you are paying.
Similarly, if there is some problem with the building itself – say, a defective heating and air conditioning system – and the seller is not willing to fix it, you may decide that you are getting such a good deal on the building that you will proceed with the purchase despite the defect.