Fix potential SEGV with corrupt value stats