Bug fix: Handle the case where an APDU can be decoded but not encoded.