IMAP could have some trouble (incompatibility) with Standard Shield in some email clients… I think Alwil is trying to solve this.
The problem seems to be caused by Thunderbird using a special IMAP feature - downloading the messages by pieces - i.e. it doesn’t download the whole message, it doesn’t even download the particular attachments as whole - but it simply downloads the message cut into smaller pieces, one by one (at least I suppose so - theoretically, it may get the pieces even randomly - one here, one there…).
This feature, unfortunatelly, breaks avast! scanning - the virus is not recognized from a small piece of message only.