Here is a small patch for it -
Also, I found that the Group ID param is passed differently in different files, for instance - /mod/wiki/create.php accepts Group ID as param gid, whereas, in /mod/wiki/view.php, files.php accepts it as - group
Selecting 'All participants' from the 'Visible Groups' drop down menu does not switch to 'All participants' as param group is not passed as group=0. I think it is a different issue, and can be handled separately.
I am looking into it.