This prevents a validation failure where the code checks whether a file
is already shared with another user, but the check disables itself when
the owner is the same. Processing the groups first prevents the check
to kick in too early when the group share still has the old owner while
we try transferring the user share.
When transferring ownership, only the local files will be transferred
during the rename operation. This means that the analyzing code doesn't
need to recurse into any mount points.
Furthermore this fixes issues where FailedStorage might appear as mount
points as a result of inaccessible external storages or shares. So this
makes it more robust.