A recognisance entered into under this division is terminated—
(a) at the end of its period; or
(b) if it is forfeited under section 20 (1) (a) ; or
(c) if the offender appears before the court under section 20 (2) ; or
(d) if a court orders that it is terminated;whichever is the first to happen.