If it matters, I think saying no to the cake was unnecessary in the first place. Who doesn't like a little cake on their birthday - whether 4 or 40! Yes, she already had a cake, but it's not that unusual to have a "big" celebration and then something smaller on one's birthday.
The child is 4. As you said, she's not really at the stage of knowing not to express disappointment over her cake. I think if she straightened up after "the talk", then I'd say she did pretty well for 4. Even if MIL's talk was, "I'll get you another cake later", that's MIL's fault, not your daughter's. I wouldn't have "punished" your daughter for not liking her cake because of grandma.
So, I'm kind of pleased Baby got another taste of cake on her birthday and hope both celebrations were fun for her!