Added debug information to blocks

When blocks are removed debug info is lost. It is now recreated, not
remembered.