Implements basic immutable tree merge (w/o persistent data)