Add lookup and insert functionality for global index.
Make global dedupe code buildable.