[BUGFIX] Fix reference count when ref_table is sys_file