Fix a problem with reg_getcred's unit test.