Termbox models its dependency on the wikibase.entityPage.entityLoaded module (and hook of the same name) via ResourceLoader.
According to the logic described in the patch which removed this kind of modeling from wikibase entity pages (https://gerrit.wikimedia.org/r/592416/) this is not legitimate, as
The entityLoaded module does have dependencies which are not modeled in
ResourceLoader and consequently expressing it as a dependency can result
in a broken dependency chain (if the entityLoaded module's preconditions
are not satisfied).
The entityLoaded hook is fired by explicitly loading the entityLoaded
module in FullEntityParserOutputGenerator (at the "top level").
Termbox should not model the dependency via ResourceLoader and trust on the backend to fire the hook.
This was discovered during T264893 were a situation as described occurs: termbox gets loaded, but the preconditions for wikibase.entityPage.entityLoaded, which can not be modeled through ResourceLoader themself, are not satisfied because of another bug and we hit the entityLoaded exception.
Is an oversight which should have been avoided back in in https://gerrit.wikimedia.org/r/592416/.