The problem could be related to having more than 1000 links in some of your categories. You should notice that within the sub build_category_pages, a LIMIT is set to 1000 links per category. If the number of links in the category exceeds 1000, then that category won't build.
Solution:
1) Create additional sub-categories to break up your links.
OR
2) Delete all the LIMIT codes or change the 1000 to a higher number like 5000.
Regards,
Eliot Lee
Solution:
1) Create additional sub-categories to break up your links.
OR
2) Delete all the LIMIT codes or change the 1000 to a higher number like 5000.
Regards,
Eliot Lee