Support {foo: foo} == {foo}

This is the implementation of Issue #1019

| Q             | A       |
| ------------- |:-------:|
| Bug fix?      | no      |
| New feature?  | yes     |
| BC breaks?    | no      |
| Deprecations? | no      |
| Fixed tickets | #1019   |
| License	    | MIT     |