https://bugs.gentoo.org/show_bug.cgi?id=332611
Though I have no idea what is going wrong here, there's not enough context to determine fault, and the failure is temporal.
I suspect a race condition occurred so the world file was not present/had 0 lines in it at the exact time of running the test, so user may have been doing multiple packages simultaneously.