Get rid of getPrefixedId in EntityContent::equals and added missing check

Change-Id: I70f7a4f61c2c8236c8cd201c6aa1938b3def18f0