Xref names don't have the pipe character in them ( | ), but the blocks that are associated with an xref will. Also anything associated with an xref will have a pipe character in the name of it. So one checks to see if the block IS an xref, the other checks to see if it is NESTED in a xref.