Don't store duplicates in the scope array. Fixes #2.