[IR] Bug fix in StoreLocalVarPlacementNode

* Consider this Ruby code:

    state = ""
    t = Thread.new do
      begin
        Thread.pass until state == :run
        raise RuntimeError
      end
    end

    lambda do
      t.abort_on_exception = true
      state = :run
      t.join
    end.call

* When AddLocalVarLoadStoreInstructions pass was enabled, this code
  was stuck in an infinite loop because the dirty 'state' value in
  the temporary variable was not being spilled to the binding before
  the 't.join' call.

* The check for testing whether the dirty var belonged to a different
  scope was missing a test for it not being a closure-var (as in this
  case, it is a non-closure var being dirtied in a closure).