Some fixes for fuzzed APE files.

Fixes #474 and #475.