Error was erroring when internal non leaf nodes split and tree level > 2. Changed how we we were updating level of newly created non leaf nodes. Tree seems to work now.