Fix segfault caused by changing splay tree key after insertion