This relies on iteration order of JS objects, which
is technically undefined. But currently all relevant
browsers implement first-defined-first-iterated order
for non-numeric keys. And I've written the specs so that
they will fail on browsers that don't adhere to this.