Some multipart/related emails not processing correctly

Certain types of multipart emails are not processed correctly.

{
  "id": "22222",
  "threadId": "222222",
  "labelIds": [
    "CATEGORY_PERSONAL",
    "INBOX"
  ],
  "snippet": "Removed",
  "payload": {
    "partId": "",
    "mimeType": "multipart/mixed",
    "filename": "",
    "headers": [
    ],
    "body": {
      "size": 0
    },
    "parts": [
      {
        "partId": "0",
        "mimeType": "multipart/alternative",
        "filename": "",
        "headers": [
          {
            "name": "Content-Type",
            "value": "multipart/alternative; boundary=\"PROOFPOINT_BOUNDARY_2\""
          }
        ],
        "body": {
          "size": 0
        },
        "parts": [
          {
            "partId": "0.0",
            "mimeType": "text/plain",
            "filename": "",
            "headers": [
              {
                "name": "Content-Type",
                "value": "text/plain; charset=\"utf-8\""
              },
              {
                "name": "Content-Transfer-Encoding",
                "value": "8bit"
              }
            ],
            "body": {
              "size": 439,
              "data": "VGhpcyBpcyBhIHNlY3VyZSBtZXNzYWdlIGZy"
            }
          },
          {
            "partId": "0.1",
            "mimeType": "multipart/related",
            "filename": "",
            "headers": [
              {
                "name": "Content-Type",
                "value": "multipart/related; boundary=\"PROOFPOINT_BOUNDARY_3\""
              }
            ],
            "body": {
              "size": 0
            },
            "parts": [
              {
                "partId": "0.1.0",
                "mimeType": "text/html",
                "filename": "",
                "headers": [
                  {
                    "name": "Content-Type",
                    "value": "text/html; charset=\"utf-8\""
                  },
                  {
                    "name": "Content-Transfer-Encoding",
                    "value": "8bit"
                  }
                ],
                "body": {
                  "size": 2406,
                  "data": "PCFET0NUWV"
                }
              },
              {
                "partId": "0.1.1",
                "mimeType": "image/png",
                "filename": "logo.png",
                "headers": [
                  {
                    "name": "Content-Type",
                    "value": "image/png; name=\"logo.png\""
                  },
                  {
                    "name": "Content-Transfer-Encoding",
                    "value": "base64"
                  },
                  {
                    "name": "Content-Description",
                    "value": "logo.png"
                  },
                  {
                    "name": "Content-ID",
                    "value": "\u003c159750896419970717-100001\u003e"
                  },
                  {
                    "name": "Content-Location",
                    "value": "logo.png"
                  }
                ],
                "body": {
                  "attachmentId": "ANGjdJ_25Fb0WjL8eP",
                  "size": 10879
                }
              },
              {
                "partId": "0.1.2",
                "mimeType": "image/gif",
                "filename": "lock.gif",
                "headers": [
                  {
                    "name": "Content-Type",
                    "value": "image/gif; name=\"lock.gif\""
                  },
                  {
                    "name": "Content-Transfer-Encoding",
                    "value": "base64"
                  },
                  {
                    "name": "Content-Description",
                    "value": "lock.gif"
                  },
                  {
                    "name": "Content-ID",
                    "value": "\u003c159750896419970717-100002\u003e"
                  },
                  {
                    "name": "Content-Location",
                    "value": "lock.gif"
                  }
                ],
                "body": {
                  "attachmentId": "ANGjdJ84",
                  "size": 1933
                }
              }
            ]
          }
        ]
      },
      {
        "partId": "1",
        "mimeType": "text/html",
        "filename": "SecureMessageAtt.html",
        "headers": [
          {
            "name": "Content-Disposition",
            "value": "attachment; filename=\"SecureMessageAtt.html\""
          },
          {
            "name": "Content-Transfer-Encoding",
            "value": "7bit"
          },
          {
            "name": "Content-Type",
            "value": "text/html; charset=utf-8; name=\"SecureMessageAtt.html\""
          }
        ],
        "body": {
          "attachmentId": "ANGjdJ",
          "size": 106457
        }
      }
    ]
  },
  "sizeEstimate": 133002,
  "historyId": "39377188",
  "internalDate": "1614713550000"
}