Make loadfacts() idempotent and call it implicitly for to_json() and value()