This is horrible, but it works
Slightly less horrible, working in all SQL adapters
Merge branch 'master' into nested-eager