You don't want to use trigger once in a loop or function. Trigger once makes the event only run if it didn't run last tick. If you use it in an event that runs more than once in the same tick then it has weird results.
Say you start pressing D and right together on tick count 10. The function is called for the first player. It checks if that last tick that the trigger once ran was tick count 9 and if not then the event runs and it updates the last tick count to the current tick count (= 10).
Then the function is called again for the next player. Again it checks if this event last ran on tick count 9 which it didn't because it last ran on tick count 10 and so it runs for the second player as well. So on tick count 10 you press D and right and both players move to the right.
On the next tick (tick count 11), the function is called for the first player and it checks if the last tick count was 10, which it was, so it doesn't run again for player 1 and player 1 doesn't move. The last tick count is updated to 11. Then the function is called for player 2 and it checks if the last tick count was 10, which it isn't any more so the event runs and player 2 moves to the right.
And so on. Player 1 moves to the right only on the first tick and player 2 keeps moving every tick which is the behaviour that you see.