Fix #0015420: Invalid category check is not made

http://www.mantisbt.org/bugs/view.php?id=15420