prevent duplicates when using analyze. fixes #171