What flac and foobar2000 versions are you using? Works fine here with fb2k 0.9.3b4 and flac-1.1.2.
There is also a notice about --replay-gain option in flac:
QUOTE
Calculate ReplayGain values and store them as
FLAC tags. Title gains/peaks will be computed
for each file, and an album gain/peak will be
computed for all files. All input files must
have the same resolution, sample rate, and
number of channels. The sample rate must be
one of 8, 11.025, 12, 16, 22.05, 24, 32, 44.1,
or 48 kHz. [...]