AMI: Fix improper handling of lines that are exactly 1025 bytes long.