The wild casting in the treap code can cause memory corruption if it's fed bad offsets. Add some assertions so that we can see when this is happening. Signed-off-by: Zach Brown <zab@versity.com>