Fixing NPE in flat-file data store, and improving cycle detection / minimizing recursion in graph aggregator