Fix bug in sourcedict deduplication false positive

The values stored in the gtree were statically allocated, and gtrees do
not copy their members. Switched to dynamic allocation.