In some cases (visible using PostgreSQL), the order of the elements of a complex list is not maintained.
To reproduce the problem, use the NXP-2810 hg branch of nuxeo-core and set SQLRepositoryTestCase.USE_EXTERNAL_PG_SERVER to true in the following test case:
http://hg.nuxeo.org/nuxeo/nuxeo-core/rev/ca8dbb73cb00
The test itself is given in the following changeset:
http://hg.nuxeo.org/nuxeo/nuxeo-core/rev/5d15eeb14056