"(4) A person charged in criminal proceedings is not competent to give evidence in the proceedings for the prosecution (whether he is the only person, or is one of two or more persons, charged in the proceedings). (5) In subsection (4) the reference to a person charged in criminal proceedings does not include a person who is not, or is no longer, liable to be convicted of any offence in the proceedings (whether as a result of pleading guilty or for any other reason)."