The clearCustomName() and hasDisplayName() methods in the ItemStack class are inconsistent with getDisplayName() as they ignore the LocName NBT Tag used for custom translated displaynames.
relates to
MC-123790"italic":false in custom item names does not make name non-italic
Resolved
MC-123804Explorer map and Ominous banner names appear in item frames, draw in italics, and can be removed with an anvil