     if hash != @hash
       new BitmapIndexedNode().with(shift, @hash, this).with(shift, hash, leaf)
     else
-      new CollisionNode(hash, this.bucketWithout(leaf.key).concat([leaf]))
+      newBucket = this.bucketWithout(leaf.key)
+      newBucket.push leaf
+      new CollisionNode(hash, newBucket)
 
   without: (shift, hash, key) ->
     switch @bucket.length

      result = step(result, x)
    result

  arrayWith: (a, i, x) -> a[...i].concat([x], a[i+1..])

  arrayWithInsertion: (a, i, x) -> a[...i].concat([x], a[i..])

  arrayWithout: (a, i) -> a[...i].concat(a[i+1..])


  mask: (key, shift) -> (key >> shift) & 0x1f

# changed node. This has therefore to be assured by the caller, and
# ultimately by the collection classes themselves.
#
# This version: Copyright (c) 2010 Olaf Delgado-Friedrichs (odf@github.com)
#
# Original copyright and licensing:
