elementExistsInHash: only check the property if not checking by reference
elementExistsInHash: only check the property if not checking by reference

Former-commit-id: 063befaba7bdef74b5e00eb6f53d4bd7a5f5d3bd [formerly f156d003f4de14d1a9c6f4a5daff4b7e1f61444e]
Former-commit-id: bb38e2a9b56320f87903fce0addf10e257c3b824
andrewplummer/Sugar,romancow/Sugar,andrewplummer/Sugar,romancow/Sugar