In a classic episode of Hancock’s Half Hour first broadcast in 1959, Tony Hancock plays a jury foreman who almost persuades his fellow jurors to acquit an obviously guilty jewellery thief. Less well remembered is the film’s closing scene, in which the entire jury is seen standing in the dock accused of conspiring to steal one of the exhibits.

Life is about to imitate art. The Criminal Justice and Courts Bill, which had its second reading in the Commons last week, would make it a criminal offence for a member of a jury that is trying a case to research that case while the trial is going on. Offenders would face trial by another jury and up to two years in prison.

Research, for these purposes, is not confined to looking things up on the internet. It includes asking a question of anyone except the judge and, normally, other jurors. It includes visiting the scene of the alleged crime. It includes conducting experiments. And it includes asking someone else to do the research for you.

There are defences: the offence will not be committed unless the juror knows, or ought reasonably to know, that the information being sought may be relevant to the case. But that, too, is widely drawn: it includes information about anyone involved in the case, whether as defendant, witness, lawyer or judge. It also includes the law of evidence and court procedure. Fortunately for law students called to jury service, it is not an offence to seek information you need for other purposes.

And how are police to investigate these offences? Inevitably, there will have to be new exceptions to the sacred principle of jury confidentiality. Once the judge authorises an investigation, other jurors will be allowed to disclose information to investigators. If information comes to light subsequently, the Court of Appeal will be able to initiate an investigation and disclose information to a convicted defendant.

The new offence of jury research was recommended by the Law Commission in a report published three months ago. But the bill includes another new offence that was not supported by a formal recommendation from the government’s law reform advisers. If parliament agrees, it will become a crime for a juror to engage in ‘prohibited conduct’ during the trial period.

That is defined as ‘conduct from which it may reasonably be concluded that the person intends to try the issue otherwise than on the basis of the evidence presented in the proceedings on the issue’. The offence would be one of strict liability, committed whether or not the juror knows that the conduct is prohibited.

The person we have to thank for this vague and woolly new offence is Kasim Davey. Little more than a year ago, Davey, then 20, found out that he would be trying a man accused of sexual activity with a child. Making it clear that this was the sort of defendant he had always wanted to try, Davey posted a message on Facebook implying he would convict the ‘paedophile’ regardless of the evidence.

Last July, a court found he had intentionally interfered with the administration of justice by disregarding his duties to act as a juror. He was given two months’ imprisonment for contempt.

We are entering dangerous territory with this new offence. What if the jury retires and one juror tells the others that he is gong to convict or acquit for no other reason than the colour of the defendant’s skin? Surely it can be inferred that the juror intends to try the issue other than on the evidence? If a juror tells the usher what has been going on and the judge orders a investigation, the police will be able to investigate the jury’s deliberations. It will not be long before defendants start appealing against their convictions on the basis that a juror was not paying attention in court.

But do individual jurors behave in such a perverse way? If the government had really wanted to know, it would have implemented one of the most far-reaching recommendations made by the commission in its recent report: that, subject to safeguards, there should be approved academic research into jury deliberations. That proposal is not in the bill.

Concerns such as these were not raised during the Commons debate last week. The main point that interested MPs was the government’s decision to raise the maximum age for jury service to 75. Nothing wrong with that, of course; but why now?

Jonathan Djanogly, the former justice minister, rather gave the game away. Officials apparently thought that by increasing the number of retired jurors the government would have to pay less compensation for loss of earnings. But if jurors start to find themselves moving from the jury box to the dock, the system will need all the recruits it can find.