Be more careful about decoding malformed attributes