Add test for createNestedKeys option, fix order being reversed in final ...

...js