Casa:
I have not tested it yet, but you should be able to just change the MIN sql function to MAX. ie:
Replace the following in the plugin:
Code:
$hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MIN(attachment.attachmentid) AS attachmentid ";
With:
Code:
$hook_query_fields .= ", attachment.thumbnail_filesize AS thumbsize , MAX(attachment.attachmentid) AS attachmentid ";