test & fix for searching for rows using an array of primary keys