Add check for internal duplicates on import