       return node._memoizedStartTagOpenDeriv[this.uniqueIndex]
 
     _startTagOpenDeriv: (node) ->
-      return new NotAllowed("expected #{this}", this, node)
+      return builder.notAllowed("expected #{this}", this, node)
 
     startTagCloseDeriv: (node) ->
       if node._memoizedstartTagCloseDeriv is undefined

          descend = descend - 1
        patt = patt.childrenDeriv(node.childNodes, descend)
      else
        return new After(builder.empty("skipping 1"), builder.empty("skipping descent"))
      if patt instanceof NotAllowed
        return patt
      return patt.endTagDeriv(node)

      @dereference()
      if @pattern?
        return @pattern.startTagOpenDeriv(node)
      return builder.notAllowed("cannot find reference '#{@refname}'", this, node)
    _endTagDeriv: (node) ->
      @dereference()
      if @pattern?
        return @pattern.endTagDeriv(node)
      return builder.notAllowed("cannot find reference '#{@refname}'", this, node)
    attDeriv: (attribute) ->
      @dereference()
      if @pattern?
        return @pattern.attDeriv(attribute)
      return builder.notAllowed("cannot find reference '#{@refname}'", this, node)

    _toString: ->
      @refname
