Fix check that would never trigger.

length may be negative in the case of a large record, but our
check would not have detected that.