I had the same problem just now. I found that I could move the courses to a different category under Site Administration > Manage courses and categories and then back to the original category. That fixed the problem.
Installing and upgrading help
Can not find data record in database table context
This discussion has been locked so you can no longer reply to it.