Where there is an issue with a property that cannot be solved reasonably quickly indemnity insurance can be used. As an example, 15 years ago the seller replaced a basement window with a larger one but never got planning permission to do so and he should have done. The buyer takes out an insurance policy that says "Should the local authority ever pursue the matter the insurance company will pay the costs". Indemnity insurance is widely used to deal with small and large issues. See Legal Matters in Property Purchases for more details.
