Fixes occasional crash in dex2oat. (cherry picked from commit 519fd543) Bug: 19264997 Change-Id: Icb1a323d8c44fa40309486e17aec56d2c2588e67