set a limit to recursion in increment_program_childcount