MDL-47146 grades: correctly resolve parent of category