Moment judge recognised school friend in dock