(1)If any person, in respect of whom an order requiring security is made under Section 106 or Section 117, is, at the time such order is made sentenced to or undergoing a sentence of imprisonment, the period for which such security is required shall commence on the expiration of such sentence.