Scope variables.

Store them in a vector instead of a map, and search in reverse order so
that variables with identical identifiers don't clobber each other. (Use
the most recently added.)