Optimizex IN operations and turns them into EXISTS where possible