Subsections (1 and 3) shall not apply during any period within which a prisoner is undergoing solitary confinement for any offence against prison discipline; but
save as aforesaid this section shall apply notwithstanding that a prisoner is undergoing punishment for any offence against prison discipline