The problem has nothing to do with foobar2000.
I've repeated the experiment few times and the result is the same. Two of nine files always become broken after applying replaygain with mpcgain. This happens only with --standard preset (-q 5). With --extreme there is no problem with mpcgain.
The problem is present with both last versions of mpcgain - the original one from 26 Feb. ant the one from build 439.
There is another problem with official build, it doesn't accept wildcards, so I had to supply a list with all files in order to be evaluated as one album

~