Recover vdex regression on multidex.

As shown on golem, multidex apps regressed on vdex due
to having to call FastVerify on each dex file.

bug: 63467744
Test: test.py

(cherry picked from commit a6fc787e6bb07accff37ff9de059127b0c380153)

Change-Id: Ica46f84d758e4ff58776f80af802d59ac9d97558
diff --git a/dex2oat/dex2oat.cc b/dex2oat/dex2oat.cc
index 271babf..ea7ce1d 100644
--- a/dex2oat/dex2oat.cc
+++ b/dex2oat/dex2oat.cc
@@ -1774,11 +1774,15 @@
   }
 
   bool ShouldCompileDexFilesIndividually() const {
-    // Compile individually if we are not building an image, not using any compilation, and are
-    // using multidex.
-    // This means extract, verify, and quicken, will use the individual compilation mode (to reduce
-    // RAM used by the compiler).
+    // Compile individually if we are:
+    // 1. not building an image,
+    // 2. not verifying a vdex file,
+    // 3. using multidex,
+    // 4. not doing any AOT compilation.
+    // This means extract, no-vdex verify, and quicken, will use the individual compilation
+    // mode (to reduce RAM used by the compiler).
     return !IsImage() &&
+        !update_input_vdex_ &&
         dex_files_.size() > 1 &&
         !CompilerFilter::IsAotCompilationEnabled(compiler_options_->GetCompilerFilter());
   }