Handle invalid suffixes and overflow independently, so that callers can treat them independently as needed. Fix some bugs in suffix handling.