It may be that this is a multi level compressed file and the problem is more likely to be that it can't remove the single file from within the .7z file and recompile it. So effectively the file could be come corrupted.
You have a few choices:
1. Manual removal of the infected files from within the .7z file.
2. Change the avast settings to remove the complete archive if it can't remove the infected file from within it or always remove the whole archive.
Personally I wouldn't do either of these as I prefer to make the decision on a case by case basis.
3. Or manually remove the complete archive file.