Add variable binding from environment to queries