Fixed bug where duplicate variable labels could be used in some cases when building quantified terms.