How character references are used in court is under a spotlight after an out-of-date letter was submitted for a high-profile child sex offender.