Ok, I was experimenting for about 30 minutes, and found the fix for my case.
I replaced your 512-514 lines (of CF7DBPlugin.php)
if (ob_get_contents()) {
ob_clean(); // Fix bug where download files can be corrupted
}
with next lines
while (ob_get_level()) {
ob_end_clean();
}
Notice, I had to remove if (ob_get_contents()) statement, because with it the file remained corrupted.