[BUGFIX] Local user is not always related to LDAP

Under some circumstances, where 2 local users with the same
username are present, one of them being marked as deleted and
the other being active, it is possible that the relation is
created with the deleted record instead of the active one,
leading to 2 active users after the operation.

Fixes: #61062
Change-Id: I6962df63308326fae7dca9162e4b3d1fadb316ea
Reviewed-on: http://review.typo3.org/32258
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Tested-by: Xavier Perseguers <xavier@typo3.org>