heap_index: add __current_allocating thread-local flag. Improve error reporting for deep index.