Otherwise the GC could see dangling pointers. bug:30033802 (cherry picked from commit cf48fa03) Change-Id: I2c43e973878f50dc147aa0af81551ecc942a790d