(5) Where, at any time, a person who is imprisoned in a prison or place of confinement other than a penitentiary is subject to two or more terms of imprisonment, each of which is for less than two years, that are to be served one after the other, and t
he aggregate of the unexpired portions of those terms at that time amounts to two years or more, the person shall be transferred to a penitentiary to serve those terms, but if any one or more of such terms is set aside or reduced and the unexpired
portions of the remaining term or terms on the day on which that person was transferred under this sect
...[+++]ion amounted to less than two years, that person shall serve that term or terms in accordance with subsection (3).