Improved test for DDC-1514 failing in some situations.

The problem is that the database will not guarantee entity a2 to be the second ([1]) in the results, because when not specifying an ORDER BY any order of results can not be guaranteed by the database.

This is a partial fix for bug http://www.doctrine-project.org/jira/browse/DDC-2689