Right. Well that proves you have a problem.
One possible fix bight be:
SELECT * FROM mdl_context WHERE contextlevel = 50 AND instance id = /*id of the course the quiz is in */
Then
UPDATE mdl_question_categories SET contextid = /* that context id */ WHERE contextid = 109960
Then you probably need to do Admin -> Development -> Purge all caches, and click the button.
Doing that should be safe, I think.