Fix scoping rules on lhs of with clause