No person who is granted immunity under subdivision (b) of Section 1105 shall be criminally prosecuted or be subjected to any criminal penalty for or on account of any act, transaction, matter, or thing material to the matter under investigation by the board concerning which he or she has been compelled as a witness to testify or to produce documentary evidence pursuant to the granting of immunity; but no person so testifying or producing shall be exempt from prosecution and punishment for any perjury committed by him or her in that testimony.