Fix crash due to GCC 4.9 optimizing out member assignments in destructors.