Fixed the recursion bug. 8/10 tests pass now, remaining need to fix define order and CGenerator order