#311& #310 - improved query to check for bulk uploads, discussed in  #371.