This is not a final fix since there are other problems this change does not fix. CCBUG: 283105 (cherry picked from commit 89929553)