Btrfs: make sure roots are assigned before freeing their nodes