This was wrong before. Can you change to:

                    if (!childExpr.evaluate(tuple, ptr)) {
                        return false;
                    }

                    if (ptr.getLength() == 0) {
                        return true;
                    }