glretrace: Fix several problems with the earlier commit.
glretrace: Fix several problems with the earlier commit.

apitrace/apitrace,trtt/apitrace,PeterLValve/apitrace,apitrace/apitrace,schulmar/apitrace,tuanthng/apitrace,joshua5201/apitrace,swq0553/apitrace,swq0553/apitrace,swq0553/apitrace,surround-io/apitrace,apitrace/apitrace,trtt/apitrace,joshua5201/apitrace,EoD/apitrace,trtt/apitrace,swq0553/apitrace,swq0553/apitrace,schulmar/apitrace,EoD/apitrace,surround-io/apitrace,schulmar/apitrace,PeterLValve/apitrace,apitrace/apitrace,EoD/apitrace,surround-io/apitrace,trtt/apitrace,surround-io/apitrace,joshua5201/apitrace,PeterLValve/apitrace,joshua5201/apitrace,EoD/apitrace,tuanthng/apitrace,surround-io/apitrace,PeterLValve/apitrace,trtt/apitrace,schulmar/apitrace,EoD/apitrace,schulmar/apitrace,tuanthng/apitrace,joshua5201/apitrace,tuanthng/apitrace,tuanthng/apitrace