It had an invalid character in some of the size names - the '#' in "Envelope#10", "JapaneseEnvelope#3.FB" and "JapaneseEnvelope#4.FB".
I think it's still wrong for cups to respond with a syntactically invalid response to get-printer-attributes in this case, so I'm keeping this bug open for now.
I'll clone it into another bug against hpcups which I think is responsible for the PPD file.