Added support for foreign sampler variables.