This comment is a bit worrying - we need to ensure that the assumption is true (which we should be doing).  The comment makes it seem as though that's happenstance.  It would be better to add a comment in queryContacts that we must be sure to preserve the input order in the output list.