Fix issue #230

The problem was that `inner` was not refering to the correct node in
the `setPos` expression if the inner node got replaced.