fix to bug in which user-defined replacement func might get arg with namedcnt of 1