189.—(1) This section applies where a person who is liable to be detained under a public protection order without restrictions is detained in custody in pursuance of any sentence or order passed or made by a court in the United Kingdom (including an order committing or remanding the person in custody).
(2) If the person is detained in custody for a period exceeding 6 months, or for successive periods exceeding 6 months in total, the person ceases at the end of the period of 6 months beginning with the first day of the detention in custody to be liable to be detained under the public protection order.
(3) Subsection (4) applies where—
(a)subsection (2) does not apply; and
(b)at the time of the person’s discharge from custody, the person is liable to be detained under the public protection order.
(4) Section 244 (power to return to hospital etc a person who is absent without permission) applies in relation to the person as if on the day of the discharge from custody the person had absented himself or herself without permission given under section 187 from the establishment where the person is liable to be detained under the public protection order.