Fix problem deleting unused resources in the delete resource operation of the local catalogue