[GEOT-4380] FunctionExpressionImpl returns wrong number of arguments sometimes