Fix two errors introduced in #1110 and #1112. Since
#1110, encountering the invalid indirect reference #1110
-2147483648 n R produces an integer underflow which, if
undetected, immediately trigger a logic error. Since
#1112, object -1 0 R may be incorrectly identified as
an earlier generation of itself and deleted,
invalidating a live iterator.
It is possible to reproduce the failure with this file following the
instructions with oss-fuzz, though it does not cause a failure in CI.
The failure was introduced in
18c1ffe0df.
Ordinarily the trailer doesn't contain any strings, so this is usually
a non-issue, but if the trailer contains strings, linearizing and
encrypting with object streams would include encrypted strings in the
trailer, which would blow out the padding because encrypted strings
are longer than their cleartext counterparts.