"...if you don't immediately tell the police your defence when you are arrested, the court may ignore anything you say in your trial, and convict you anyway."
Of course the court can't ignore anything and everything you say at trial. But they can discount the prefect alibi which you say today your brother would have given you, if only he hadn't left for Antarctica yesterday. You cannot now ambush the prosecution with a totally new defence involving facts which you knew but kept secret, so that no investigation of them could be done.
Defendants have a right to know what they are accused of. Now the prosecution has a right to know what sort of defence you intend to mount.
I am appalled that in some terrorist cases in the UK the full details of the accusation may not be told to the accused and his legal team. At the same time, I do not like the old pattern of the accused getting off because out of the blue they called as witness Mrs Bloggs, without the prosecution having time to establish that she is actually the defendant's Great Aunt Sadie with a criminal record even longer than his.
As @Kupfernigk says, bumpy progress is better than no progress.