This is not quite right. The first resource named "fred" will get a slug of "fred".  The second one will get a slug of "fred-1". When we try to add a third resource named "fred", there's still only one with a slug of "fred", so we'll try to add another "fred-1" and fail.