adjust `begin` block to ensure `ensure` variables are always in scope