Guard against a panic in TruncateEncodedChangeLog

Fixes #243