I think that's a good idea, although it needs to be done very carefully to prevent stack overflows. I'd like to do this task as a separate PR, does that sound OK to you?