       del @options, 'operation'
       del @options, 'chainRoot' unless this instanceof AccessorNode or this instanceof IndexNode
     top     = if @topSensitive() then @options.top else del @options, 'top'
-    closure = @isStatement() and not @isPureStatement() and not top and
+    closure = @isStatement(o) and not @isPureStatement() and not top and
               not @options.asStatement and not (this instanceof CommentNode) and
               not @containsPureStatement()
     if closure then @compileClosure(@options) else @compileNode(@options)

  isPureStatement: LiteralNode::isStatement

  compileNode: (o) ->
    idt = if @isStatement() then @idt() else ''
    end = if @isStatement() then ';' else ''
    idt + @value + end

  toString: (idt) ->

    condO    = merge o
    o.indent = @idt 1
    o.top    = true
    ifDent   = if child or (top and not @isStatement(o)) then '' else @idt()
    comDent  = if child then @idt() else ''
    body     = @body.compile(o)
    ifPart   = "#{ifDent}if (#{ @compileCondition(condO) }) {\n#{body}\n#{@tab}}"
