Cherrypick commit -  core: Bugfix (band-aid?) for PD/Goldeneye crashes when reloading. (NOTE: Upstream sure could do with a huge cleanup session)