glretrace: Fix several problems with the earlier commit.