Fix 500 when selecting a mirror user

Merged Sean McGivern requested to merge 29316-can-t-select-a-mirror-user-ee into master

When selecting a mirror user, we do a permissions check, which means that @users is an array, not an ActiveRecord relation.

We also can't use Array#delete, because it uses Object#equal?, while we need to be able to take advantage of ActiveRecord objects overriding #eql? and #hash? (as Array#uniq uses a hash internally).