Well we can make a string that works without this side effect
[$rg2sc($if2(%REPLAYGAIN_ALBUM_GAIN%,%REPLAYGAIN_TRACK_GAIN%))]
I saw you posted your findings in the regular expression thread. Unfortunately that's not the right place. I'll move it later.
Edit: I've moved it here
/t/8069/1
as it is the same topic.
I hope you update it with the new string.