Include the ext ids in the compare function