Defence QC Donald Findlay suggested Alexander Cannon, who has bipolar disorder, might have had "a deep dark secret", but a psychiatrist said Mr Cannon had delusions of guilt.
His name is on a list produced by defence lawyers in the trial of John Docherty, 49, who denies strangling the 16-year-old girl near her Greenock home in June 1986.
Mr Docherty has lodged a special defence of incrimination at the High Court in Edinburgh, claiming that the police's list of 41 suspects might include the true killer.
A number have been called to court in the last five weeks to deny responsibility, but lawyers agreed not to ask Mr Cannon to give evidence as medics said it might worsen his condition.
Mr Cannon walked into Greenock Police Office in February 2011 and said he wanted to confess to killing Ms Doyle.
He walked off before he could be interviewed, and the following day was back in hospital, the trial heard.
Psychiatrist Dr Eilidh Orr, of Inverclyde Royal Hospital said a feature of his illness was delusional beliefs.
Mr Findlay asked her: "Are you able to say that in February 2011 he did not have a deep dark secret?"
"I cannot say that," replied Dr Orr. "All I can say is that he was in a depressed state."
Mr Docherty, now of Hunters' Quay Holiday Village, Dunoon, denies murder and says he was at home with his parents when Elaine Doyle died.
He is alleged to have seized her hair, struck her on the head and either removed or compelled her to remove her clothing before placing a ligature round her neck and strangled her.
Docherty also denies stealing a handbag. He further denies a charge of attacking another woman between 1990 and 1995 in Greenock. The trial continues.