fixes #2498 FactNames are not precreated

Witlessbird's fix to reduce database lookups and do Ruby hash lookups instead