Good question. I think none of this logic is needed anymore as I no longer use the display name from the XBlockInfo when displaying the editor. I'll try removing all this confusing code.