Fix NPE when retrying code validation

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>