fix bug in resource_facets table (but a bunch of other work in process goes along for the ride)