Fix impact indexes for resources not yet in database; tests