invoke

operator fun Expression?.invoke(): QueryTree<Any?>

Calls ValueEvaluator.evaluate for this expression, thus trying to resolve a constant value.