When entering a command such as /testfor with a target selector having the 'm=' parameter, the tab completion list includes the 'd' and 'default' options, but if you choose either of these options the message "Game mode 'd' [or 'default'] is invalid" is output. Either the tab completion list needs to omit these options, or the command interpreter needs to be updated to support them.
Note that when a player's Personal Game Mode is set to Default, the argument selector selects them or not according to whether the argument value matches the Default Game Mode. In other words, the argument selector apparently tests the player's actual game mode rather than their Personal Game Mode setting.
Sample commands that show the issue:
/tp @p[m=d] @s