Conflicting drupal role ids
One way can be to get role id from role name than use role, since we fetch the rid dynamically so there is no chance of conflict. An example will go like 

// Helper function to get user role by username.
function get_role_by_name($name) {
  $roles = user_roles();
  return array_search($name, $roles);
}

// Role ID for Member role
$member_rid =  get_role_by_name("Member");

// Use Rid now
$roles = array(
$member_rid =&gt; 'Member');