(3)Where the covenant or agreement is discharged or modified by an order under the Law of Property Act, 1925, or otherwise, or the court refuses to grant an injunction for enforcing the same, the entry shall either be cancelled or reference made to the order or other instrument and a copy of the order, judgment, or instrument shall be filed at the registry.