FC-2588 var scoping in MySQL DB gateway