Former detective chief inspector William Clark conceded that mistakes were made but denied attempting to hide them from prosecutors.
At the High Court in Edinburgh, Mr Clark, 77, faced questions about why he seemed to have given conflicting accounts of the scene of the crime during the past 28 years.
He told the trial that Elaine's naked body, found just yards from her Greenock home, was covered by a blanket.
But in June 2012 Mr Clark apparently told another detective there was no blanket, leading to suggestions from defence QC Donald Findlay that Mr Clark had been "fitted up" and that his statement had been fabricated.
Mr Clark also admitted that two detectives who took a disputed "confession" about a gang bang leading to the girl's death were quietly sidelined after allegations of intimidation.
Defence QC Donald Findlay challenged: "This inquiry was rotten to the core."
Mr Clark told the lawyer: "Yes, I suppose it was."
John Docherty, 49, now of Hunters' Quay, Holiday Village, Dunoon, denies murder. He claims that at the time he is alleged to have stripped and strangled Elaine he was with his parents. He further denies a charge of attacking another woman, Linda Hargie.
The trial continues.