"On button pressed" is a triggered event. It's triggered only once for every button pressed.
I think what happens is when you press 2 buttons quickly enough, this event is triggered once for both buttons.
The problem is, Gamepad.LastButton(0) only stores one of the buttons codes, not both.
The best you can do is this:
Here is the output if I press two buttons quickly:
Pressed
Button: 4
Button: 5
--
Unfortunately, the same happens if I am holding button 4 and then press button 5.
So this solution is not very reliable.
I would recommend not to use "On button pressed" event at all.
Detect buttons pressed using testing events "Is button down" or "Is button index down". You can add "System->Trigger once" condition if necessary.