174 . The witnesses on either side or on both or all sides shall, on motion of any of the parties, be kept out of court and of hearing, except the witness immediately under examination; nor shall any witness, who shall remain in court or within hearing after order made to that effect, be permitted to give evidence, unless in the case of a witness called to prove some fact which has incidentally become essential in the course of the trial, and the necessity of which could not reasonably have been anticipated. And every witness who has been examined shall be kept separate from, and shall be allowed no communication with, those who still remain to be examined :
Provided that it shall be lawful for the court in its discretion to allow any witness to be examined, if it shall think such examination conducive to the attainment of truth or justice, notwithstanding that such witness shall have remained in court or within hearing contrary to such order aforesaid. *Witnesses may be kept out of court.*