I don't see underscores anywhere at the moment in the 5.0.x branch before this patch is applied.
What bug does this fix? How can I test that this patch fixes it?
Because there were no keymap files with underscores.
Instead there were / are filenames with spaces ("Mac OS X_keys.props") which is not too nice.
If you want to see underscores, just create a keymap file in your settings/keymaps/ folder that is named My_Nifty_Keymapping_keys.props and you will see "My_Nifty_Keymapping" in the dialog.
It is better not to ship and create files with spaces in their name if possible and thus I made this change. :-)