While I was looking at the interaction of delayed folding with GGC, I noticed that ggc_handle_finalizers currently runs no finalizers if G.context_depth != 0. So any GC objects in a greater depth will still be collected, but they won't have their finalizers run. This specifically affects compiles that use a PCH file, since G.context_depth is set to 1 after loading the PCH. This patch fixes ggc_handle_finalizers to look at the depth of each finalizer so that we still don't try to run finalizers for non-collectable objects loaded from the PCH, but we do run finalizers for collectable objects allocated after loading the PCH. I ended up not relying on this for delayed folding, but it still seems like a good bug fix. Tested x86_64-pc-linux-gnu. OK for trunk?