Fix scoping of translation variables. Fix Issue #287