gpu_stmt_access: keep track of reference id