Replace ArrayLists with ImmutableLists in BTree.