This was discovered while verifying: https://entityframework.codeplex.com/workitem/197 and is essentially the same problem.
Basically when using contains like so:
```
int foo = 10;
ctx.Customers.Select(c => c.Id).Contains(foo);
foo = 20;
ctx.Customers.Select(c => c.Id).Contains(foo);
```
and DefaultIfEmpty like so:
```
var bar = "Dog";
ctx.Customers.Select(c => c.Name).DefaultIfEmpty(bar).ToList();
bar = "Cat";
ctx.Customers.Select(c => c.Name).DefaultIfEmpty(bar).ToList();
```
the values of foo and bar do not get parametrized. We fixed that for Take and Skip in EF6 (these two are much more prevalent), but we should also fix Contains and DIE in a future.
Basically when using contains like so:
```
int foo = 10;
ctx.Customers.Select(c => c.Id).Contains(foo);
foo = 20;
ctx.Customers.Select(c => c.Id).Contains(foo);
```
and DefaultIfEmpty like so:
```
var bar = "Dog";
ctx.Customers.Select(c => c.Name).DefaultIfEmpty(bar).ToList();
bar = "Cat";
ctx.Customers.Select(c => c.Name).DefaultIfEmpty(bar).ToList();
```
the values of foo and bar do not get parametrized. We fixed that for Take and Skip in EF6 (these two are much more prevalent), but we should also fix Contains and DIE in a future.