Make sure slug has unique index and append correct number if already exists.