(b) No child who has been convicted of an offense under the adult jurisdiction of the circuit court shall be held in custody in a penitentiary of this state: Provided, That such child may be transferred from a secure juvenile facility to a penitentiary after he shall attain the age of eighteen years if, in the judgment of the court which committed such child, such transfer is appropriate: Provided, however, That any other provision of this code to the contrary notwithstanding, prior to such transfer the child shall be returned to the sentencing court for the purpose of reconsideration and modification of the imposed sentence, which shall be based upon a review of all records and relevant information relating to the child's rehabilitation since his conviction under the adult jurisdiction of the court.