update/bugfix :values injection/scoping for sub queries, add test cases