Fix api compile error if two mrefs to the same table