[#1716] Wrap Lang.set(...) in try/finally