FC-2588 var scoping in MSSQL DB gateway