fix use of unscoped in duplicate-checking