Fixes an issue where a ConcurrentModificationException
could be thrown if fetching an empty result list from multiple threads, since results are sorted before being returned, and even sorting an empty list can trigger ConcurrentModificationException
if another thread is currently iterating through the list (#334, thanks to @mer2github for reporting).