Preventing variables from being selected more than once.

Issue: GCP-9122
Reviewer: Rebecca B (post commit)