gj_util.py: fix bug that when the first argument is a number, there may be unmatched lines returned by gid.