This reverts commit d24915207c631b7cf637081f333b41bc5159c700. Thinking about this more this probably chewed up 100+ bytes of stack for each recursive call. So this probably needs more thought. The code simplification wasn't that much.
call foo