Shiiko, I was able to repeat this. Thanks for reporting it. The problem happens if you create a parent from a virtual thought and then attempt to delete it. You do not need to do a DB rebuild after the error. To delete the thought, unlink it from the virtual thought first and then the delete will proceed normally.
Supported videos include:
Please paste your code into the box below: