I wonder if this error message is reliable.
Today, I installed three Moodles, the same way, side by side in the same web root, in Moodle 3.6.2 on a LiquidWeb Linux cPanel VPS server that runs ModSecurity -- something I have used for several years now.
I could restore backups into two of the Moodles, but the third gave the "more than one top" error message.
The fact that two of the Moodles worked made me suspicious of the error message. In addition, when I first encountered this error message last year, I searched my downloaded question bank without being able to find the problem the error message pointed to.
I compared the three Moodles and changed what was different about the one that did not work. It was:
1. I had started using it before assigning a unique name for its cookies (in Server/Session Handling). I fixed this.
2. I had created several course categories in that Moodle, but not in the others. I deleted all but Miscellaneous.
After these changes, the recalcitrant Moodle began to restore the identical backup file it had rejected earlier, and continued to restore successfully, both from a web restore and from a command-line restore.
This experience makes me wonder if the error message might be triggered by things other than the error it reports.
Or if there IS a real top-category problem, and it will come back to haunt me.