@@ -4240,11 +4240,11 @@ generate_ghash_stubs(); generate_chacha_stubs(); #ifdef COMPILER2 - if ((UseAVX == 2) && EnableX86ECoreOpts) { + if ((UseAVX == 2) && EnableX86ECoreOpts && !UseCompactObjectHeaders) { generate_string_indexof(StubRoutines::_string_indexof_array); } #endif if (UseAdler32Intrinsics) {