The language factory uses a caching scheme that basically breaks down for Wikibase because a lot of languages are requested all the time, often for a single page. Languages used should be cached, and kept for at least the duration of the present page rendering. Probably it is easier to just set the number of languages cached somewhat higher and use a simple purging of the oldest language on a list of most recently used ones.
Version: unspecified
Severity: enhancement