rem: if (Tcl_GetIndexFromObj(interp, lobjv[i], wopt, "when", 1,
add: if (Tcl_GetIndexFromObj(interp, lobjv[i], wopt, "when", 0,
context: NsTclRegisterFilterObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]){    NsInterp *itPtr = arg;    int       lobjc;    Tcl_Obj **lobjv;    int       when, i;    static CONST char *wopt[] = {        "prequeue", "preauth", "postauth", "trace", NULL    };    enum {        PQIdx, PRIdx, POIdx, TRIdx,    } widx;    if (objc < 2) {        Tcl_WrongNumArgs(interp, 1, objv, "option ?args?");        return TCL_ERROR;    }    if (objc != 5 && objc != 6) {        Tcl_WrongNumArgs(interp, 1, objv, "when method url script ?arg?");        return TCL_ERROR;    }    if (Tcl_ListObjGetElements(interp, objv[1], &lobjc, &lobjv) != TCL_OK) {	return TCL_ERROR;    }    when = 0;    for (i = 0; i < lobjc; ++i) {    	if (Tcl_GetIndexFromObj(interp, lobjv[i], wopt, "when", 1,                (int *) &widx) != TCL_OK) {            return TCL_ERROR;    	}	switch (widx) {	case PQIdx:            when |= NS_FILTER_PRE_QUEUE;	    break;	case PRIdx:            when |= NS_FILTER_PRE_AUTH;	    break;	case POIdx:            when |= NS_FILTER_POST_AUTH;	    break;	case TRIdx:            when |= NS_FILTER_TRACE;	    break;	}    }    if (when == 0) {	Tcl_SetResult(interp, "blank filter when specification", TCL_STATIC);	return TCL_ERROR;    }    RegisterFilterObj(itPtr, when, objc - 2, objv + 2);    return TCL_OK;}