Adding test to prove that type are still correctly used when biding
values inside a subquery