reinstate, expand factory tests to take caches into account
reinstate and slightly extend relevant tests; drop an irrelevant one
address review