WIP for safekeeping.

This was an attempt to get "recursive" PGIA working. However, the code
is broken (it deadlocks). After messing around for a bit, I'm beginning
to think it will be easier to write recursive PGIA from scratch, rather
than trying to bolt it onto the existing implementation. There's simply
too much state to keep track of, scattered amongst fields, local
variables, subtasks, etc.

[ci skip]