Remove double entity-encoding in graphs