Switch from picking the last body part (plus html > text) to picking the largest body part (still html > text).
Example:
-----------Mime Message-----------
> multipart/alternative
> | text/plain <---------------- size=2000
> | multipart/mixed
> | | text/html <---------------- size=1000
> | | application/pdf; inline
> | | text/html <---------------- size=50
----------------------------------
Before the part with size=50 would have been picked, now size=1000 is picked.