Apple offer a stand alone repair tool which will fix this problem when iTunes built in tool fails to do the job.
open