[BUGFIX] TreeDataProvider::isCategoryAllowed() wrong check

Resolves: #57669
Change-Id: I3a94f3a63594f0ad72ead44ee2eb7301d88fcbb2
Reviewed-on: https://review.typo3.org/29275
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer