The makes checking for duplicates more efficient, as you don't have to use String() and re-parse elements from it anymore. Fixes #679