Fix detection of duplicate property names in object literals and classes.