Try fetching block_userlist.id as the first field returned, that will make every returned record have a unique first field. I also note you've not put { } around the table names, which you need to do for Moodle to automatically insert the table prefix ("mdl_" by default on new installs).
Alternatively you could use get_recordset_sql - which doesn't create an indexed array, so doesn't need a unique first field.