(CFACT-59) Add id and gid facts

Same two comments as above for this function as well.