Fix for #1328 - empty key_name in delete_key attempts to remove bucket.