I'm gonna try to open val images to see if it's just a matter of file corruption/incorrect format.
edit : all the images seems uncorrupted (altho preg level 4 are still old style), so I think it's just a problem with that particular line of code.
Sadly since I don't have the map files from previous version, I can't just replace the line with its previous version.