I have noticed that all filter taps from the firdes class are normalized by dividing them over the sum of all taps magnitude
for (int i = 0; i < ntaps; i++)
taps[i] = taps[i] / scale * gain;
is not summing over the magnitude, but over the taps.
(doesn't make a difference here, all these taps are positive real numbers, but for other ...