Currently, an instance of SingleEntitySourceServices is passed into the prefetching term lookup callbacks, creating a dependency between SingleEntitySourceServices and PrefetchingTermLookup.
While working on T277314, work on this has already begun, but was stopped in order to not create a dependency between WikibaseRepo (or Client) and Lib.
See referenced patches for what was done. As a solution, it was concluded that perhaps passing the factory as well as the entity source to the callback will enable the users of this callback to decide whether they need to instantiate the single entity source services or not.
This task is a suggestion of an approach to be implemented, and of course, if we eventually decide to go with a different approach it can be declined.
Depends on T277856: Remove PrefetchingTermLookup from WikibaseServices