Test and fix the category loading bug we found in the previous refactor.

Normally we would combine this commit with the previous one.