code: private Block convertToDeepTree(Block sourceTree, String iconName)
      {
          XDOM targetTree = new XDOM(Collections.<Block>emptyList());
          Block pointer = targetTree;
          for (Block block : sourceTree.getChildren()) {
              pointer.addChild(block);
              pointer = block;
          }
          // Add an image block as the last block
          pointer.addChild(new ImageBlock(new ResourceReference(iconName, ResourceType.ICON), true));
          return targetTree;
      }
docs: Converts a standard XDOM tree into a deep tree: sibling are transformed into parent/child relationships and the
  leaf node is an Image node referencing the passed icon name.
  
  @param sourceTree the source tree to modify
  @param iconName the name of the icon to display when a match is found
  @return the modified tree