Fix an issue with publishing a "deleted" replacement document and harvesting a document with a resource_locator array.

Also fix issue when trying to publish with resource_locator as an array.