Fix EZP-22958: invalid values in subtree criterion handler, update tests