Whenever the <new_table> tag is used in the league files to create a new table, say for a beginning and closing half to the league's season, like the Apertura and Clausura in Mexico and South America for example, the following season will take the order for the league and subsequently any cup files, from the last table of the previous season and not the aggregate table, which is usually the first table and also the table most desired to retrieve this information from.</new_table>
The following url is linked to the bug report on this topic on the forum: https://bygfoot.sourceforge.io/forum/viewtopic.php?f=1&t=783&sid=2ea8a0e76067f68d30f955c6262ac872.
Ah. I don't know how to edit a bug report entry but I think I should have worded it as "...from the last table CREATED of the previous season and not the aggregate table, ..."