It caps at 399 reds so if you reveal a double up card and you're above that number then nothing will happen. The same applies for yellows but it's a 199 of each type of yellow so if you have over 199 of a certain type of yellow than that type will not double. I don't know how you're yellows are split but I'm going to assume that you have over 199+ of certain types maybe 199 +3's, 199 +2's, and 199 + 1's (I realise that adds up to 597 and not 598)
There aren't any known bugs with the double up cards.
And the 399 cap only applies to adding red cards from the top bar, and from the keyholder adding more than 399. You can still go over by revealing yellow cards that add reds