When a Block node was deleted its linked blocks were not unlinked which caused a crash when the user tried to select a linked block. This fixes the issue by ensuring all links are removed when a Block node is delete. Undo/redo is also supported.