Restore category parent comparision to check int values since the number...

... can be nil.
Fixes #1261